1 | import { Event } from './events';
|
2 | import { Disposable } from './disposable';
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | export interface CancellationToken {
|
9 | |
10 |
|
11 |
|
12 | readonly isCancellationRequested: boolean;
|
13 | |
14 |
|
15 |
|
16 | readonly onCancellationRequested: Event<any>;
|
17 | }
|
18 | export declare namespace CancellationToken {
|
19 | const None: CancellationToken;
|
20 | const Cancelled: CancellationToken;
|
21 | function is(value: any): value is CancellationToken;
|
22 | }
|
23 | export interface AbstractCancellationTokenSource extends Disposable {
|
24 | token: CancellationToken;
|
25 | cancel(): void;
|
26 | }
|
27 | export declare class CancellationTokenSource implements AbstractCancellationTokenSource {
|
28 | private _token;
|
29 | get token(): CancellationToken;
|
30 | cancel(): void;
|
31 | dispose(): void;
|
32 | }
|