Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
import { IterateFunction, Resolvable } from './types';
export interface EachExecutionOptions {
    inflight?: number;
}
/**
 * Returns a promise that returns an array of resolved values from `input` iterable.
 * Each resolved value are passed to `iterator` function in series for execution.
 *
 * *The `input` iterable is not modified.*
 *
 * @param input Iterable of resolvable values to pass to `iterator` function.
 * @param iterator A function which will be executed on the resolved value from `input` iterable.
 */
export declare function each<T>(input: Resolvable<Iterable<Resolvable<T>>>, iterator: IterateFunction<T, void>): Promise<T[]>;
/**
 * Returns a promise that returns an array of resolved values from `input` iterable.
 * Each resolved value are passed to `iterator` function in series for async execution
 * with a maximum number of `options.inflight` async execution limit.
 *
 * *The `input` iterable is not modified.*
 *
 * @param input Iterable of resolvable values to pass to `iterator` function.
 * @param iterator A function which will be executed on the resolved value from `input` iterable.
 * @param options.inflight Maximum number of inflight limit that can be executed at the same time. Default is `1`.
 */
export declare function each<T>(input: Resolvable<Iterable<Resolvable<T>>>, iterator: IterateFunction<T, void>, options: EachExecutionOptions): Promise<T[]>;