UNPKG

@node-libraries/promise-limit

Version:

Limits the maximum number of asynchronous processes that can be executed

6 lines (5 loc) 246 B
export declare const promiseLimit: (ps?: Set<Promise<unknown>>) => { add: (p: Promise<unknown> | (() => Promise<unknown>)) => Set<Promise<unknown>>; wait: (limit: number) => false | Promise<unknown>; all: () => Promise<unknown[]>; };