From 140d4e120cbc868f7ae555bc81e64dfc3b421b4d Mon Sep 17 00:00:00 2001
From: Xiaokang Xin <xiaokang.xin@airbnb.com>
Date: Sat, 29 Jul 2023 16:03:28 -0700
Subject: [PATCH] update Array#forEach: use a generic type parameter to ensure
 elements type are inferred correctly

---
 src/lib/es5.d.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts
index a187e3c04a0f3..1f52da0693f75 100644
--- a/src/lib/es5.d.ts
+++ b/src/lib/es5.d.ts
@@ -1237,7 +1237,7 @@ interface ReadonlyArray<T> {
      * @param callbackfn  A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
      * @param thisArg  An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
      */
-    forEach(callbackfn: (value: T, index: number, array: readonly T[]) => void, thisArg?: any): void;
+    forEach<U>(callbackfn: (value: T, index: number, array: readonly T[]) => void, thisArg?: any): void;
     /**
      * Calls a defined callback function on each element of an array, and returns an array that contains the results.
      * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.