GraphReFlyTS

API Reference

terminalErrorValue()

Read the terminal payload when the slot is an ERROR value.

Import

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

Signature

function terminalErrorValue(t: unknown): unknown

Parameters

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

Returns

The payload when t is an ERROR slot, otherwise undefined.

Example

terminalErrorValue(new Error("boom"));

Source

packages/ts/src/ctx/types.ts