variable / @typed/fx/RefGraph

getNode

Get a node’s data.

Package version
2.0.0-beta.7
Category
Optional queries
Since
1.18.0

Import

import { getNode } from "@typed/fx/RefGraph";

Signatures

export declare const getNode: {
    (nodeIndex: Graph.NodeIndex): <N, E, T extends Graph.Kind, Err, R>(ref: RefGraph<N, E, T, Err, R>) => RefSubject.Filtered<N, Err, R>;
    <N, E, T extends Graph.Kind, Err, R>(ref: RefGraph<N, E, T, Err, R>, nodeIndex: Graph.NodeIndex): RefSubject.Filtered<N, Err, R>;
};

Why

Models the possibly absent result of get node as Filtered state, so absence stays explicit while later source versions can make a value available.

Ownership and lifetime

The get node view retains no independent value. Its Effect read fails with NoSuchElement while absent; the observing Scope owns and finalizes its Fx subscription.

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source