GraphReFlyTS

API Reference

of()

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

Import

import { of } from "@graphrefly/ts/sources";

Signature

function of(...values: T[]): Operator<never, T>

Parameters

ParameterTypeDescription
valuesT[]Values to emit synchronously on activation.

Returns

A source operator that emits each value and then COMPLETE.

Example

import { graph } from "@graphrefly/ts/graph";
import { of } from "@graphrefly/ts/sources";

const values = graph().initNode(of(1, 2, 3), []);

Source

packages/ts/src/graph/sources.ts