UNPKG

640 BTypeScriptView Raw
1export declare class CheckedPromise<T> implements Promise<T> {
2 [Symbol.toStringTag]: any;
3 private hasCatch;
4 private promise;
5 constructor(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void);
6 then<R, E>(onfulfilled?: (value: T) => PromiseLike<R> | R, onrejected?: (reason: any) => PromiseLike<E> | E): Promise<R | E>;
7 catch<TResult>(onrejected?: (reason: any) => PromiseLike<TResult> | TResult): Promise<T | TResult>;
8 finally(onfinally?: (() => void) | undefined | null): Promise<T>;
9}
10export declare function checkPromise<T>(p: Promise<T>): CheckedPromise<unknown>;