2023-02-06 15:59:47 +01:00

13 lines
341 B
TypeScript

export type MapAsync<T = any, R = any> = lodash.CurriedFunction3<
T[],
(element: T, index: number) => R | Promise<R>,
{ concurrency?: number },
Promise<R[]>
>;
export type ForEachAsync<T = any, R = any> = (
array: T[],
func: (element: T, index: number) => R | Promise<R>,
options?: { concurrency?: number }
) => Promise<R[]>;