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) 374 B
/** returns boolean */ export declare type CallBackFind<T> = (value: T, index?: number, collection?: T[]) => Promise<boolean>; /** * Async Find function * * @export * @template T * @param {T[]} elements * @param {CallBackFind<T>} cb * @returns {Promise<T | undefined>} */ export declare function aFind<T>(elements: T[], cb: CallBackFind<T>): Promise<T | undefined>;