{"size": 559, "ext": "js", "max_stars_repo_path": "definitions/npm/promise-limit_v2.x.x/flow_v0.25.x-v0.103.x/promise-limit_v2.x.x.js", "max_stars_repo_name": "mixmaxhq/flow-typed", "max_stars_repo_stars_event_min_datetime": "2016-03-10T05:35:12.000Z", "max_stars_repo_stars_event_max_datetime": "2018-07-03T07:37:21.000Z", "max_issues_repo_path": "definitions/npm/promise-limit_v2.x.x/flow_v0.25.x-v0.103.x/promise-limit_v2.x.x.js", "max_issues_repo_name": "mixmaxhq/flow-typed", "max_issues_repo_issues_event_min_datetime": "2016-03-10T04:06:18.000Z", "max_issues_repo_issues_event_max_datetime": "2018-07-03T14:22:08.000Z", "max_forks_repo_path": "definitions/npm/promise-limit_v2.x.x/flow_v0.25.x-v0.103.x/promise-limit_v2.x.x.js", "max_forks_repo_name": "mixmaxhq/flow-typed", "max_forks_repo_forks_event_min_datetime": "2016-03-10T05:35:18.000Z", "max_forks_repo_forks_event_max_datetime": "2018-07-03T14:09:31.000Z"}
{"max_stars_count": 2722, "max_issues_count": 1480, "max_forks_count": 1184, "avg_line_length": 25.4090909091, "max_line_length": 67, "alphanum_fraction": 0.6368515206}
/**
 * Flow libdef for 'promise-limit'
 * See https://www.npmjs.com/package/promise-limit
 * by Vincent Driessen, 2019-01-04
 */

declare module 'promise-limit' {
  declare type limit<T> = limitFunc<T> & limitInterface<T>;
  declare type limitFunc<T> = (fn: () => Promise<T>) => Promise<T>;
  declare interface limitInterface<T> {
    map<U>(
      items: $ReadOnlyArray<T>,
      mapper: (value: T) => Promise<U>,
    ): Promise<Array<U>>;
    queue: number;
  }

  declare export default function limitFactory<T>(
    concurrency?: number,
  ): limit<T>;
}
