declare type PromiseExecutor = (resolve: (value: TValue | PromiseLike) => void, reject: (reason?: any) => void) => void; export declare type CancelablePromise = { then(onfulfilled?: ((value: TValue) => TResultFulfilled | PromiseLike | CancelablePromise) | undefined | null, onrejected?: ((reason: any) => TResultRejected | PromiseLike | CancelablePromise) | undefined | null): CancelablePromise; catch(onrejected?: ((reason: any) => TResult | PromiseLike | CancelablePromise) | undefined | null): CancelablePromise; finally(onfinally?: (() => void) | undefined | null): CancelablePromise; cancel(): void; isCanceled(): boolean; }; export declare function createCancelablePromise(executor: PromiseExecutor): CancelablePromise; export declare namespace createCancelablePromise { var resolve: (value?: TValue | PromiseLike | CancelablePromise | undefined) => CancelablePromise | undefined>; var reject: (reason?: any) => CancelablePromise; } export declare function cancelable(promise: Promise): CancelablePromise; export {};