Interface ISharedFile

Text/Markdown/Code files are represented as ISharedFile

Hierarchy

Implemented by

Properties

changed: ISignal<ISharedFile, FileChange>

The changed signal.

disposed: ISignal<ISharedFile, void>

A signal emitted when the object is disposed.

isDisposed: boolean

Test whether the object has been disposed.

Notes

This property is always safe to access.

source: string

Text

state: JSONObject

Document state

Methods

  • Dispose of the resources held by the object.

    Notes

    If the object's dispose method is called more than once, all calls made after the first will be a no-op.

    Undefined Behavior

    It is undefined behavior to use any functionality of the object after it has been disposed unless otherwise explicitly noted.

    Returns void

  • Get the value for a state attribute

    Parameters

    • key: string

      Key to get

    Returns undefined | JSONValue

  • Set the value of a state attribute

    Parameters

    • key: string

      Key to set

    • value: JSONValue

      New attribute value

    Returns void

  • Perform a transaction. While the function f is called, all changes to the shared document are bundled into a single event.

    Parameters

    • f: (() => void)
        • (): void
        • Returns void

    Returns void

  • Replace content from start' to endwithvalue`.

    Parameters

    • start: number
    • end: number
    • Optional value: string

    Returns void

Generated using TypeDoc