///
import * as util from 'util';
export interface IResolve {
(value?: T | Promise): void;
}
export interface IReject {
(reason?: any): void;
}
export declare type TDeferredStatus = 'pending' | 'fulfilled' | 'rejected';
export declare class Deferred {
promise: Promise;
resolve: IResolve;
reject: IReject;
status: TDeferredStatus;
constructor();
}
export declare let defer: () => Deferred;
/**
* Creates a new resolved promise for the provided value.
*/
export declare let resolvedPromise: (value?: T) => Promise;
/**
* Creates a new rejected promise for the provided reason.
*/
export declare let rejectedPromise: (err: any) => Promise;
export declare let promisify: typeof util.promisify;
export declare let map: (inputArg: T[], functionArg: any) => Promise;