From b2e788683a34e3a2937a8b88545697f666297f60 Mon Sep 17 00:00:00 2001 From: Rob Pilling Date: Thu, 10 Oct 2024 20:02:27 +0100 Subject: [PATCH] main.d.ts: fix `[].reduce` types --- typescript/types/main.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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