Interface InstanceBase<T>

InstanceBase defines the set of common methods on an Instance that are present regardless of the underlying type specified in the type parameter T.

Type Parameters

Hierarchy

Properties

id

Methods

Properties

id: undefined | string

Get the object ID of the underlying instance.

If the underlying instance at runtime is not a LiveObject, returns undefined.

Methods

  • Registers a listener that is called each time this instance is updated.

    If the underlying instance at runtime is not a LiveObject, this method throws an error.

    The provided listener receives an Instance representing the updated object, and, if applicable, an ObjectMessage that carried the operation that led to the change.

    Instance subscriptions track a specific object instance regardless of its location. The subscription follows the instance if it is moved within the broader structure (for example, between map entries).

    If the instance is deleted from the channel object entirely (i.e., tombstoned), the listener is called with the corresponding delete operation before automatically deregistering.

    Parameters

    Returns Subscription

    A Subscription object that allows the provided listener to be deregistered from future updates.

Generated using TypeDoc