GraphReFlyTS

API Reference

isTerminalError()

Check whether a terminal slot carries ERROR payload data.

Import

import { isTerminalError } from "@graphrefly/ts/core";

Signature

function isTerminalError(t: unknown): boolean

Parameters

ParameterTypeDescription
tunknownTerminal slot value from {@link Ctx.terminal}.

Returns

true when the slot is neither none nor COMPLETE.

Example

isTerminalError(new Error("boom")); // true

Source

packages/ts/src/ctx/types.ts