Skip to content
PACKAGES

of()

of: synchronous values — each argument as DATA, then COMPLETE. of() is the EMPTY source.

import { of } from "@graphrefly/ts/sources";
function of(...values: T[]): Operator<never, T>
ParameterTypeDescription
valuesT[]Values to emit synchronously on activation.

A source operator that emits each value and then COMPLETE.

import { graph } from "@graphrefly/ts/graph";
import { of } from "@graphrefly/ts/sources";
const values = graph().initNode(of(1, 2, 3), []);

packages/ts/src/graph/sources.ts