@@ -49,9 +49,11 @@ export async function map<T, U>(array: T[] | ReadonlyArray<T>, callback: (curren
4949
5050export async function reduce < T > ( array : T [ ] , callback : ( accumulator : T , currentValue : T , currentIndex : number , array : ReadonlyArray < T > ) => Promise < T > ) : Promise < T > ;
5151export async function reduce < T > ( array : T [ ] , callback : ( accumulator : T , currentValue : T , currentIndex : number , array : ReadonlyArray < T > ) => Promise < T > , initialValue : T ) : Promise < T > ;
52+ export async function reduce < T , R > ( array : T [ ] , callback : ( accumulator : R , currentValue : T , currentIndex : number , array : ReadonlyArray < T > ) => Promise < R > ) : Promise < R > ;
5253export async function reduce < T , U > ( array : T [ ] , callback : ( accumulator : U , currentValue : T , currentIndex : number , array : ReadonlyArray < T > ) => Promise < U > , initialValue : U ) : Promise < U > ;
5354export async function reduce < T > ( array : ReadonlyArray < T > , callback : ( accumulator : T , currentValue : T , currentIndex : number , array : ReadonlyArray < T > ) => Promise < T > ) : Promise < T > ;
5455export async function reduce < T > ( array : ReadonlyArray < T > , callback : ( accumulator : T , currentValue : T , currentIndex : number , array : ReadonlyArray < T > ) => Promise < T > , initialValue : T ) : Promise < T > ;
56+ export async function reduce < T , R > ( array : ReadonlyArray < T > , callback : ( accumulator : R , currentValue : T , currentIndex : number , array : ReadonlyArray < T > ) => Promise < R > ) : Promise < R > ;
5557export async function reduce < T , U > ( array : ReadonlyArray < T > , callback : ( accumulator : U , currentValue : T , currentIndex : number , array : ReadonlyArray < T > ) => Promise < U > , initialValue : U ) : Promise < U > ;
5658export async function reduce < T , U > ( array : T [ ] | ReadonlyArray < T > , callback : ( accumulator : T | U , currentValue : T , currentIndex : number , array : ReadonlyArray < T > ) => Promise < T | U > , initialValue ?: T | U ) : Promise < T | U > {
5759 const hadInitialValue = typeof initialValue === 'undefined' ;
0 commit comments