Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IParent

Interface implemented by something that can be a parent of a Collab.

Only reference this interface directly if you are a Collab implementing it in order to be a Parent. Otherwise, use the Parent type.

See CObject's implementation for "default" behavior.

Hierarchy

Implemented by

Index

Methods

  • Internal (Collab.send) use only.

    Sends the given message on behalf of child. In general, this parent is then responsible for delivering the given message to Collab.receive on each replica of child, with guarantees set by the runtime.

    Parameters

    Returns void

  • fromID<C>(id: CollabID<C>, startIndex?: number): undefined | C
  • Inverse of idOf.

    Specifically, given a CollabID returned by idOf on some replica of this parent, returns this replica's copy of the original descendant. If that descendant does not exist (e.g., it was deleted or it is not present in this program version), returns undefined.

    Type Parameters

    Parameters

    • id: CollabID<C>

      A CollabID from idOf.

    • Optional startIndex: number

      Internal (parent) use only. If provided, treat id.collabIDPath as if it starts at startIndex instead of 0.

    Returns undefined | C

  • Returns a CollabID for the given strict descendant of this parent.

    The CollabID may be passed to fromID on any replica of this parent (but not other parents) to obtain that replica's copy of descendant.

    Type Parameters

    Parameters

    • descendant: C

      A strict (non-this) descendant of this parent.

    Returns CollabID<C>

Generated using TypeDoc