ICancellationToken Interface
Similar to AbortSignal, but using promise instead of events
Signature
export interface ICancellationToken<T>
Type Parameters
Parameter | Description |
---|---|
T |
Properties
Property | Type | Description |
---|---|---|
cancelled | boolean | Tells if this cancellable token is cancelled |
waitCancelled | Promise<T> | Promise that gets fulfilled when this cancellable token is cancelled |
Property Details
cancelled
Tells if this cancellable token is cancelled
Signature
readonly cancelled: boolean;
Type: boolean
waitCancelled
Promise that gets fulfilled when this cancellable token is cancelled
Signature
readonly waitCancelled: Promise<T>;
Type: Promise<T>