import { IDisposable } from './disposable'; export interface CancellationToken { readonly isCancellationRequested: boolean; /** * An event emitted when cancellation is requested * @event */ readonly onCancellationRequested: (listener: (e: any) => any, thisArgs?: any, disposables?: IDisposable[]) => IDisposable; } export declare namespace CancellationToken { function isCancellationToken(thing: unknown): thing is CancellationToken; const None: Readonly; const Cancelled: Readonly; } export declare class CancellationTokenSource { private _token?; private _parentListener?; constructor(parent?: CancellationToken); get token(): CancellationToken; cancel(): void; dispose(cancel?: boolean): void; } //# sourceMappingURL=cancellation.d.ts.map