diff --git a/typescript/types/main.d.ts b/typescript/types/main.d.ts index 24633db5b..8627e1323 100644 --- a/typescript/types/main.d.ts +++ b/typescript/types/main.d.ts @@ -10229,7 +10229,7 @@ interface Array { * @returns {any} The value returned by the last function called * @url http://www.espruino.com/Reference#l_Array_reduce */ - reduce(callback: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T; + reduce(callback: (previousValue: O, currentValue: T, currentIndex: number, array: T[]) => O, initialValue?: O): O; /** * Both remove and add items to an array