GraphReFlyTS

API Reference

initNode()

Instantiate an operator as a bare Node<T> — NO Graph required (D43 bare-node path). Wraps op.body in the D30 value-throw→ERROR boundary; merges op.opts with caller opts (caller wins, so partial/pool/dispatcher overrides take effect). The dispatcher defaults to the process-global (D26) unless opts.dispatcher is passed.

g.initNode is the same call PLUS graph registration; graph inspection (describe/observe/profile) requires that path — a node built bare here is not registered in any graph's index.

Import

import { initNode } from "@graphrefly/ts/operators";

Signature

function initNode(
	op: Operator<TIn, TOut>,
	deps: readonly Node<unknown>[],
	opts: NodeOptions<TOut> = {},
): Node<TOut>

Parameters

ParameterTypeDescription
opOperator<TIn, TOut>op value used by the helper.
depsreadonly Node<unknown>[]Declared dependency node or nodes.
optsNodeOptions<TOut>Options that configure the helper.

Returns

A Node<TOut> value.

Example

import { initNode } from "@graphrefly/ts/operators";

Source

packages/ts/src/graph/operators.ts