CancellationToken

A cancellation token is passed to an asynchronous or long running operation to request cancellation, like cancelling a request for completion items because the user continued to type.

To get an instance of a CancellationToken use a CancellationTokenSource.

Online Documentation

Properties

Link copied to clipboard
abstract external var isCancellationRequested: Boolean

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

Link copied to clipboard
abstract external val onCancellationRequested: Event<JsAny?>

An Event which fires upon cancellation.

Functions