A collection of Promise utilities.
type DelayType = (ms: number) => Promise<void>;
/**
* Creates a promise that is scheduled to resolve after a set delay.
*/
const delay: DelayType;
type CallbackType = (currentValue: any, index: any, values: Iterable<any>) => any;
type MapSeriesType = (values: Array<any>, mapper: CallbackType) => Promise<Array<any>>;
/**
* Creates a promise that is scheduled to resolve after a set delay.
*/
const mapSeries: MapSeriesType;
/**
* @property multipleArguments Makes the resulting promise fulfill with an array of the callback's success value(s).
*/
type PromisifyOptionsType = {|
multipleArguments?: boolean
|};
type PromisifyType = (nodeFunction: Function, options?: PromisifyOptionsType) => Function;
/**
* Creates a function that when executed returns a promise whose fait depends
* on the callback provided as the last parameter to the wrapped function.
*/
const promisify: PromisifyType;