Handle for a derivation registered through liveDerived.

Owners hold this handle to swap in new compute closures without tearing down the underlying node identity.

interface LiveDerivedHandle<T> {
    id: string;
    node: DerivedNode<T>;
    replace(next: Compute<T>): void;
}

Type Parameters

  • T

    The derived value type.

Properties

Methods

Properties

id: string

Stable id under which the node was registered.

node: DerivedNode<T>

The derived node registered with the graph.

Methods

  • Swap in a new compute function. Issues exactly one commit; one downstream notification fires (assuming the new compute produces a non-Object.is-equal value).

    Parameters

    • next: Compute<T>

      Replacement compute closure.

    Returns void