Interface PathObjectBase

PathObjectBase defines the set of common methods on a PathObject that are present regardless of the underlying type.

Hierarchy

Methods

  • Get the fully-qualified path string for this PathObject.

    Path segments with dots in them are escaped with a backslash. For example, a path with segments ['a', 'b.c', 'd'] will be represented as a.b\.c.d.

    Returns string

  • Registers a listener that is called each time the object or a primitive value at this path is updated.

    The provided listener receives a PathObject representing the path at which there was an object change, and, if applicable, an ObjectMessage that carried the operation that led to the change.

    By default, subscriptions observe nested changes, but you can configure the observation depth using the options parameter.

    A PathObject subscription observes whichever value currently exists at this path. The subscription remains active even if the path temporarily does not resolve to any value (for example, if an entry is removed from a map). If the object instance at this path changes, the subscription automatically switches to observe the new instance and stops observing the old one.

    Parameters

    Returns Subscription

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

Generated using TypeDoc