Skip to content

Aborted

Aborted: object

Defined in: Core/Aborted.ts:24

is: (value) => value is Aborted

Narrows any { kind } discriminated value to Aborted.

string

value is Aborted

Aborted.make to construct an Aborted outcome.

if (Aborted.is(error)) {
  logCancellation(error.reason);
}

make: (reason?) => Aborted

Creates an Aborted outcome from a cancellation reason.

Engines call this from their own AbortSignal listeners. Use it directly when a transform or a test needs to represent a cancelled run without a live signal.

unknown

Aborted

Aborted.is to check whether a settled value is a cancellation.

Aborted.make("user navigated away"); // { kind: "Aborted", reason: "user navigated away" }