Transaction handle scoped to a single commit callback.

The only mutation entry-point on the graph. Outside a commit the graph is read-only; inside a commit reads see staged writes, outside reads see the previous committed snapshot. There is no "concurrent mutation" question because there is no concurrent mutation API — the absence of the construct is what catches the concurrent-engine-mutations race class. The handle becomes invalid the moment its callback returns (StaleTxError).

interface Tx {
    set<T>(node: InputNode<T>, value: T): void;
}

Methods

Methods

  • Stage a new value for an input node.

    Type Parameters

    • T

      Value type of the target input.

    Parameters

    • node: InputNode<T>

      Input node to write.

    • value: T

      New value, applied atomically with all other set calls in the same commit. Multiple set calls in one commit land at the same GraphTime — one transaction creates exactly one new t, never a fractional moment.

    Returns void

    NotAnInputNodeError when node is a derived node.

    StaleTxError when the handle has escaped its commit.