export declare enum PromiseStatus { RESOLVED, REJECTED, } export interface PromiseResult { error: any; status: PromiseStatus; value: T; } export declare class PromiseService { /** * @param data * @returns {Promise} */ allSettled(...data: Promise[]): Promise[]>; /** * @param promises * @returns {function(...[any]): any} */ chain(promises: Function[]): (...args: any[]) => Promise; /** * @param data * @returns {Promise} */ hashAll(entry: { [key: string]: Promise; }): { [key: string]: Promise; }; /** * @param data * @returns {Promise} */ hashSettled(entry: { [key: string]: Promise; }): Promise; /** * @param timeout * @returns {Promise} */ delay(timeout: number): Promise; }