1 | export declare class PromiseCompleter<R> {
|
2 | promise: Promise<R>;
|
3 | resolve: (value?: R | PromiseLike<R>) => void;
|
4 | reject: (error?: any, stackTrace?: string) => void;
|
5 | constructor();
|
6 | }
|
7 | export declare class PromiseWrapper {
|
8 | static resolve<T>(obj: T): Promise<T>;
|
9 | static reject(obj: any, _: any): Promise<any>;
|
10 | static catchError<T>(promise: Promise<T>, onError: (error: any) => T | PromiseLike<T>): Promise<T>;
|
11 | static all<T>(promises: (T | Promise<T>)[]): Promise<T[]>;
|
12 | static then<T, U>(promise: Promise<T>, success: (value: T) => U | PromiseLike<U>, rejection?: (error: any, stack?: any) => U | PromiseLike<U>): Promise<U>;
|
13 | static wrap<T>(computation: () => T): Promise<T>;
|
14 | static scheduleMicrotask(computation: () => any): void;
|
15 | static isPromise(obj: any): boolean;
|
16 | static completer<T>(): PromiseCompleter<T>;
|
17 | }
|
18 |
|
\ | No newline at end of file |