mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Add type definitions for map-promise-limit library * map-promise-limit → promise-map-limit A typo…sigh. The GitHub repository link to promise-map-limit was previously correct, however. * Remove additional TSLint rule Thanks @plantain-00!
18 lines
532 B
TypeScript
18 lines
532 B
TypeScript
// Type definitions for promise-map-limit 1.0
|
|
// Project: https://github.com/dbrockman/promise-map-limit
|
|
// Definitions by: Joseph Kohlmann <https://github.com/kohlmannj>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 2.8
|
|
|
|
export = promiseMapLimit;
|
|
|
|
declare function promiseMapLimit<T, R>(
|
|
iterable: Iterable<T>,
|
|
concurrency: number,
|
|
iteratee: promiseMapLimit.IIteratee<T, R>
|
|
): Promise<R[]>;
|
|
|
|
declare namespace promiseMapLimit {
|
|
type IIteratee<T, R> = (value: T) => Promise<R> | R;
|
|
}
|