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