ICancellationToken Interface

Packages > @fluidframework/container-runtime > ICancellationToken

Similar to AbortSignal, but using promise instead of events

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluidframework/container-runtime/legacy.

For more information about our API support guarantees, see here .

Signature

export interface ICancellationToken<T>

Type Parameters

Parameter Description
T

Properties

Property Alerts Modifiers Type Description
cancelled Alpha readonly boolean Tells if this cancellable token is cancelled
waitCancelled Alpha readonly Promise<T> Promise that gets fulfilled when this cancellable token is cancelled

Property Details

cancelled

Tells if this cancellable token is cancelled

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/container-runtime/alpha.

For more information about our API support guarantees, see here .

Signature

readonly cancelled: boolean;

Type: boolean

waitCancelled

Promise that gets fulfilled when this cancellable token is cancelled

This API is provided as an alpha preview and may change without notice.

To use, import via @fluidframework/container-runtime/alpha.

For more information about our API support guarantees, see here .

Signature

readonly waitCancelled: Promise<T>;

Type: Promise<T>