Options
All
  • Public
  • Public/Protected
  • All
Menu

A cancellation token allows you to check if an operation has been cancelled. Additionally, you can subscribe to be notified when cancellation occurs. CancellationTokens should only be obtained from the CancellationTokenSource.token property.

Hierarchy

  • CancellationToken

Index

Properties

Methods

Properties

isCancellationRequested

isCancellationRequested: boolean

Specifies if cancellation has been requested. This value should never be set explicitly. Instead, a CancellationToken should be cancelled using the CancellationTokenSource that it was derived from.

Methods

register

  • register(action: function): any
  • Register a handler to be notified when cancellation occurs.

    Parameters

    • action: function
        • (): void
        • Returns void

    Returns any