We recommend using CancelTokenFactory instead of using CancelToken directly. This class will cancel previous token before creating new token for given key.

### Hierarchy

- TransientDisposable
  - CancelTokenFactory

### Implements

- IDisposable
- IDisposable

## Index

### Constructors

- constructor

### Methods

- dispose
- newToken
- registerIn

## Constructors

### constructor

- new CancelTokenFactory(owner?: any): CancelTokenFactory

- Inherited from TransientDisposable.constructor

  - Defined in core/TransientDisposable.ts:3

  #### Parameters

  - ##### Optional owner: any

  #### Returns CancelTokenFactory

## Methods

### dispose

- dispose(): void

- Implementation of IDisposable.dispose

  Overrides TransientDisposable.dispose

  - Defined in core/CancelTokenFactory.ts:29

  #### Returns void

### newToken

- newToken(key?: string, timeout?: number): CancelToken

- - Defined in core/CancelTokenFactory.ts:19

  This will create a new token and cancel previous token

  #### Parameters

  - ##### Optional key: string

  - ##### Default value timeout: number = -1

  #### Returns CancelToken

### registerIn

- registerIn(value: any): void

- Inherited from TransientDisposable.registerIn

  - Defined in core/TransientDisposable.ts:13

  #### Parameters

  - ##### value: any

  #### Returns void

Generated using TypeDoc