thedesk/app/node_modules/builder-util-runtime/out/CancellationToken.d.ts

19 lines
668 B
TypeScript
Raw Permalink Normal View History

2019-09-13 00:38:13 +10:00
/// <reference types="node" />
import { EventEmitter } from "events";
export declare class CancellationToken extends EventEmitter {
private parentCancelHandler;
private _cancelled;
readonly cancelled: boolean;
private _parent;
parent: CancellationToken;
constructor(parent?: CancellationToken);
cancel(): void;
private onCancel;
createPromise<R>(callback: (resolve: (thenableOrResult?: R) => void, reject: (error: Error) => void, onCancel: (callback: () => void) => void) => void): Promise<R>;
private removeParentCancelHandler;
dispose(): void;
}
export declare class CancellationError extends Error {
constructor();
}