export declare namespace VCP { class Cancelled { reason: string; constructor(reason?: string); } type CancelFnType = (reason?: any) => void; type ExecutorType = (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void; const promiseWM: WeakMap, CancelFnType>; function isPromiseCancellable(promise: Promise): boolean; function getPromiseCancelFn(promise: Promise): CancelFnType | undefined; function setPromiseCancelFn(promise: Promise, cancelFn: CancelFnType, force?: boolean): Promise; function cancelPromise(promise: Promise, reason: string): void; function cancellablePromise(promiseOrExecutor: Promise | ExecutorType): Promise>; function cancellableFetch(input: RequestInfo | URL, init?: RequestInit | undefined): Promise; function cancellableSleep(ms?: number | undefined): Promise; class PromiseAwait { private _currentCancelFn?; get currentCancelFn(): CancelFnType | undefined; private _cancelledResult?; get cancelledResult(): Cancelled | undefined; get cr(): Cancelled | undefined; constructor(); w(cancellablePromise: Promise): Promise; a(result: T | Cancelled): Cancelled | T; cancel(reason?: any): void; c(reason?: any): void; } function createCancellablePromise(asyncFn: (pa: PromiseAwait, ...args: T) => Promise, ...args: T): Promise; function any(cancellablePromises: Iterable>): Promise>; function all(cancellablePromises: Iterable>): Promise<(Cancelled | Awaited)[]>; }