tsoid
Version:
Typed functional library to deal with async operations.
9 lines (8 loc) • 307 B
TypeScript
import { FunctionPromiseA1 } from './types';
/**
* Replicate synchronously an async function n times and collect the results.
*
* @param {number} times
* @param {function} action
*/
export default function replicate<A>(times: number, action: FunctionPromiseA1<void, Promise<A>>): Promise<A[] | Error>;