Skip to content
PACKAGES

isTerminalError()

Check whether a terminal slot carries ERROR payload data.

import { isTerminalError } from "@graphrefly/ts/core";
function isTerminalError(t: unknown): boolean
ParameterTypeDescription
tunknownTerminal slot value from {@link Ctx.terminal}.

true when the slot is neither none nor COMPLETE.

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

packages/ts/src/ctx/types.ts