promise-pool
promise-pool copied to clipboard
Typescript types
Should have typescript types, at least on @types
declare module "@mixmaxhq/promise-pool" {
interface PromisePoolOptions {
/**
* default: 4
*/
numConcurrent?: number;
/**
* default: 1
*/
maxPending?: number;
}
class PromisePool {
constructor(config?: PromisePoolOptions);
start<A extends any[]>(fn: (...args: A) => Promise<void>, ...args: A): Promise<void>;
flush(): Promise<Error[]>;
}
export = PromisePool;
}
You're welcome to file a PR!