export declare type IpoolConfiguration = { concurrency?: number; failFast?: boolean; }; export declare type IsPoolObject = { [K in string | number]: any; }; export declare type IsPool = (spool: IsPoolObject, config: IpoolConfiguration) => Promise<[null | Error, any]>; export declare type Igenerator = (() => Promise) | (Generator>); export declare type Ipool = (generator: Igenerator, config: IpoolConfiguration) => Promise<[null | Error, any]>; /** * Resolves a pool of promises defined on object keys as an array of a promise to call, and arguments to pass in * @param an object with key values of a tuple of [promiseReturningFunctionRef, argsForFunctionCall] * @param a configuration object accepting a fields of concurrency:number and failFast:boolean * @return a Promise which resolves to an object shaped as the one passed in */ declare const sPool: IsPool; /** * Resolves a generated pool of promises and returns a tuple: [null | Error, [any]] * @param a function that returns a promise or null OR a generator function * @param a configuration object accepting a fields of concurrency:number and failFast:boolean * @return a Promise, which resolves to a tuble of [null | Error, [any]] */ declare const pool: Ipool; export { pool, sPool };