async-ray
Version:
Allow perform every, filter, find, findIndex, forEach, map, reduce, reduceRight and some on array using Async callback
15 lines (14 loc) • 492 B
TypeScript
/** returns any type value */
export declare type CallBackReduceRight<T, R> = (accumulator: T | R, value: T, index?: number, collection?: T[]) => Promise<T | R>;
/**
* Async ReduceRight function
*
* @export
* @template T
* @template R
* @param {T[]} elements
* @param {CallBackReduceRight<T, R>} cb
* @param {R} [initialValue]
* @returns {Promise<T | R>}
*/
export declare function aReduceRight<T, R>(elements: T[], cb: CallBackReduceRight<T, R>, initialValue?: R): Promise<T | R>;