GraphReFlyTS

API Reference

throwError()

Terminate with ERROR on activation.

Import

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

Signature

function throwError(err: unknown): Operator<never, never>

Parameters

ParameterTypeDescription
errunknownHost-language error payload to normalize into a protocol ERROR payload.

Returns

A source operator that emits ERROR.

Example

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

const failed = graph().initNode(throwError(new Error("boom")), []);

Source

packages/ts/src/graph/sources.ts