subscribeNodeValues()
Subscribe to DATA values from a Node. Protocol internals stay below the adapter boundary: DATA drives value listeners, ERROR/COMPLETE route to optional lifecycle callbacks.
Import
Section titled “Import”import { subscribeNodeValues } from "@graphrefly/ts/adapters";Signature
Section titled “Signature”function subscribeNodeValues( node: Node<T>, run: (value: T | undefined) => void, opts: SubscribeValuesOptions<T> = {},): () => voidParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
node | Node<T> | Node to observe, adapt, or connect. |
run | (value: T | undefined) => void | run value used by the helper. |
opts | SubscribeValuesOptions<T> | Options that configure the helper. |
Returns
Section titled “Returns”A () => void value.
Example
Section titled “Example”import { subscribeNodeValues } from "@graphrefly/ts/adapters";Source
Section titled “Source”packages/ts/src/adapters/store.ts