The type of the task result
Creates a new CancellableHandle instance.
The type of the task result
The AbortController used to manage cancellation
Optionalname: stringOptional name for this handle, used for debugging
Optional ReadonlynameReadonlypromiseReadonlyrejectReadonlyresolveGets the cancellation error if the task has been cancelled. Returns null if the task has not been cancelled.
The CancelError that caused the cancellation, or null if not cancelled
Backward-compatible alias for older consumers.
Indicates whether the promise has been settled (resolved or rejected)
Gets the rejection reason if the promise was rejected
Gets the resolved value if the promise was resolved
Gets the AbortSignal associated with this handle.
The AbortSignal for monitoring cancellation
Cancels the task with an optional reason.
Optionalreason: unknownOptional reason for cancellation
Checks if the task has been cancelled.
True if the task has been cancelled, false otherwise
StaticrejectStaticresolve
Handle for a cancellable task that extends Defer with cancellation capabilities. Provides methods to cancel the task and check its cancellation status.