isTerminalError()
Check whether a terminal slot carries ERROR payload data.
Import
Section titled “Import”import { isTerminalError } from "@graphrefly/ts/core";Signature
Section titled “Signature”function isTerminalError(t: unknown): booleanParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
t | unknown | Terminal slot value from {@link Ctx.terminal}. |
Returns
Section titled “Returns”true when the slot is neither none nor COMPLETE.
Example
Section titled “Example”isTerminalError(new Error("boom")); // trueSource
Section titled “Source”packages/ts/src/ctx/types.ts