DefinitelyTyped/types/promise-map-limit/index.d.ts
Joseph Kohlmann 92251a67c8 Add type definitions for promise-map-limit package (#25550)
* 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!
2018-05-07 10:52:12 -07:00

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;
}