UNPKG

times-loop

Version:

run a function n times, both sync and async functions are supported

4 lines (3 loc) 296 B
export default function times<T>(count: number, callback: (i: number) => T): T[]; export declare function timesParallel<T>(count: number, callback: (i: number) => Promise<T>): Promise<T[]>; export declare function timesSeries<T>(count: number, callback: (i: number) => Promise<T>): Promise<T[]>;