UNPKG

builder-util-runtime

Version:

HTTP utilities. Used by [electron-builder](https://github.com/electron-userland/electron-builder).

19 lines (18 loc) 692 B
/// <reference types="node" /> import { EventEmitter } from "events"; export declare class CancellationToken extends EventEmitter { private parentCancelHandler; private _cancelled; get cancelled(): boolean; private _parent; set parent(value: CancellationToken); constructor(parent?: CancellationToken); cancel(): void; private onCancel; createPromise<R>(callback: (resolve: (thenableOrResult: R | PromiseLike<R>) => void, reject: (error: Error) => void, onCancel: (callback: () => void) => void) => void): Promise<R>; private removeParentCancelHandler; dispose(): void; } export declare class CancellationError extends Error { constructor(); }