terminalErrorValue()
Read the terminal payload when the slot is an ERROR value.
Import
Section titled “Import”import { terminalErrorValue } from "@graphrefly/ts/core";Signature
Section titled “Signature”function terminalErrorValue(t: unknown): unknownParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
t | unknown | Terminal slot value from {@link Ctx.terminal}. |
Returns
Section titled “Returns”The payload when t is an ERROR slot, otherwise undefined.
Example
Section titled “Example”terminalErrorValue(new Error("boom"));Source
Section titled “Source”packages/ts/src/ctx/types.ts