UNPKG

async-ray

Version:

Allow perform every, filter, find, findIndex, forEach, map, reduce, reduceRight and some on array using Async callback

13 lines (12 loc) 368 B
/** returns nothing */ export declare type CallBackForEach<T> = (value: T, index?: number, collection?: T[]) => Promise<void>; /** * Async ForEach function * * @export * @template T * @param {T[]} elements * @param {CallBackForEach<T>} cb * @returns {Promise<void>} */ export declare function aForEach<T>(elements: T[], cb: CallBackForEach<T>): Promise<void>;