Defines a CancellationToken. This interface is not intended to be implemented. A CancellationToken must be created via a CancellationTokenSource.

interface CancellationToken {
    isCancellationRequested: boolean;
    onCancellationRequested: Event<any>;
}

Properties

isCancellationRequested: boolean

Is true when the token has been cancelled, false otherwise.

onCancellationRequested: Event<any>

An event which fires upon cancellation.