API reference · generated from source
Interface: INodeFieldChanges<TValue>#
Defined in: types.ts:115
Field-level change metadata passed to Retree change listeners.
Remarks#
previous and new are raw values, always — change records are
descriptions of the past, not live handles. Listeners that need the
managed node for an object value opt in with Retree.managed(value).
Identity comparisons against payload values should be raw-to-raw:
change.previous === Retree.raw(candidate).
node is the raw node whose field changed, always — like the payload
values, it is a description, not a live handle; resolve it with
Retree.managed(change.node) when a managed node is needed. Because
dependency-driven ReactiveNode emissions forward the dependency's change
records, node is how a listener tells records describing the listened-to
node's own fields apart from forwarded records describing a dependency.
Type Parameters#
| Type Parameter | Default type |
|---|---|
TValue | unknown |
Properties#
| Property | Type | Description | Defined in |
|---|---|---|---|
key | TNodeFieldChangeKey | - | types.ts:117 |
new | TValue | - | types.ts:119 |
node | object | - | types.ts:116 |
op? | TNodeFieldChangeOp | Structural operation marker, present only when previous/new alone cannot describe the mutation exactly. See TNodeFieldChangeOp. | types.ts:124 |
previous | TValue | - | types.ts:118 |