/** Functions for helping deal with promises */ type eachFunction = (item: ItemType) => Promise; /** * Works like Array.forEach() except runs things concurrently / in parallel. * Limits operations to a configurable in-flight maximum. * * Callback should return a promise * * Returns a promise containing the array of results */ export declare function eachConcurrent(items: ItemType[], inFlightLimit: number, callback: eachFunction): Promise; export declare function eachConcurrent(items: ItemType[], callback: eachFunction): Promise; /** * Works like Array.map() except runs things concurrently / in parallel. * Limits operations to a configurable in-flight maximum. * * Callback should return a promise * * Returns a promise containing the array of results */ export declare function mapConcurrent(items: ItemType[], inFlightLimit: number, callback: eachFunction): Promise; export declare function mapConcurrent(items: ItemType[], callback: eachFunction): Promise; /** * Works like Array.filter() except runs things concurrently / in parallel. * Limits operations to a configurable in-flight maximum. * * Callback should return a promise * * Returns a promise containing the array of items that returned true */ export declare function filterConcurrent(items: ItemType[], inFlightLimit: number, callback: eachFunction): Promise; export declare function filterConcurrent(items: ItemType[], callback: eachFunction): Promise; /** * Works like Array.some() except runs things concurrently / in parallel. * Limits operations to a configurable in-flight maximum. * * Callback should return a promise * * Returns a promise containing the array of items that returned true */ export declare function someConcurrent(items: ItemType[], inFlightLimit: number, callback: eachFunction): Promise; export declare function someConcurrent(items: ItemType[], callback: eachFunction): Promise; type pLimitFn = (..._: A) => Promise; export declare function pLimit(concurrency: number): { (fn: pLimitFn, ...args: A): Promise; activeCount: number; pendingCount: number; clearQueue: () => void; }; export {};