Genel bakış
functionCore Runtime

isCancelled

Narrows an error value to `Cancelled`.

Signature

tsSignature
export function isCancelled(error: unknown): error is Cancelled;

Imports

tsImport
import { isCancelled } from "@/lib/flow/core/runtime";
import { isCancelled } from "@/lib/flow";

Parameters

error
unknown

Error value to inspect.

Returns

`true` when the value is a cancellation runtime error.

Return type
error is Cancelled

Source

tsflow/core/runtime.ts:225-229
export function isCancelled(error: unknown): error is Cancelled {
return (
typeof error === "object" && error !== null && "kind" in error && error.kind === "cancelled"
);
}