UNPKG

447 BTypeScriptView Raw
1export interface PromiseBuffer<T> {
2 $: Array<PromiseLike<T>>;
3 add(taskProducer: () => PromiseLike<T>): PromiseLike<T>;
4 drain(timeout?: number): PromiseLike<boolean>;
5}
6/**
7 * Creates an new PromiseBuffer object with the specified limit
8 * @param limit max number of promises that can be stored in the buffer
9 */
10export declare function makePromiseBuffer<T>(limit?: number): PromiseBuffer<T>;
11//# sourceMappingURL=promisebuffer.d.ts.map
\No newline at end of file