import { ValueOrPromise } from '../common'; type TTask = () => Promise; /** * Execute all tasks with limit number of asyncronous tasks. * Whenever 1 task's resolved next task will be executed. * * @example * With 20 tasks need to execute with limit is 5 tasks asyncronous * ``` * const tasks = * await executePromiseWithLimit({ * tasks, * limit: 5, onTaskDone: (opts: { result: any }) => { // Do something on task done }, * }) * ``` */ export declare const executePromiseWithLimit: (opts: { tasks: Array>; limit: number; onTaskDone?: (opts: { result: R; }) => ValueOrPromise; }) => Promise; export {}; //# sourceMappingURL=promise.utility.d.ts.map