UNPKG

@alexaegis/common

Version:
12 lines 687 B
/** * This function will process async tasks in batches, limited by the bufferSize. * Since it needs to have control over when promises start (and since promises * are always hot) instead of promises you need to pass functions that return * the promises. * * @param tasks an array of Promise factories (async functions) * @param bufferSize (default 25) at most, this many tasks will be running at a time * @returns the results of each promise in the order they resolved or rejected */ export declare const bufferedAllSettled: <T>(tasks: (() => Promise<T>)[], bufferSize?: number) => Promise<PromiseSettledResult<T>[]>; //# sourceMappingURL=buffered-all-settled.function.d.ts.map