UNPKG

async-ray

Version:

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

14 lines (13 loc) 399 B
/** returns any type values */ export declare type CallBackFlatMap<T, R> = (value: T, index?: number, collection?: T[]) => Promise<R>; /** * Async Flay Map function * * @export * @template T * @template R * @param {T[]} elements * @param {CallBackFlatMap<T, R>} cb * @returns {Promise<R[]>} */ export declare function aFlatMap<T, R>(elements: T[], cb: CallBackFlatMap<T, R>): Promise<R[]>;