export declare class CancellationError extends Error { constructor(message?: string); } export interface CancellationToken { readonly isCancellationRequested: boolean; readonly onCancellationRequested: (listener: () => void) => { dispose: () => void; }; } export declare class CancellationTokenSource { private _isCancelled; private _listeners; get token(): CancellationToken; cancel(): void; dispose(): void; } /** * Creates a CancellationToken that is cancelled when the given disposable is disposed. */ export declare function cancelOnDispose(disposable: { add: (d: { dispose: () => void; }) => void; }): CancellationToken; //# sourceMappingURL=cancellation.d.ts.map