From 2b4c5600dff49eed1d4effc6c3515fab77f79928 Mon Sep 17 00:00:00 2001 From: "Xavier.Meng" Date: Tue, 22 Nov 2022 17:09:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0JIRA=20refactor(each):=20=E5=8A=A0?= =?UTF-8?q?=E4=B8=AA=E9=87=8D=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/core/base.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/typescript/core/base.ts b/typescript/core/base.ts index 6182a0833..4d6550f4f 100644 --- a/typescript/core/base.ts +++ b/typescript/core/base.ts @@ -38,7 +38,9 @@ export interface _base { size: (collection: any) => number; - each: (collection: T[] | object | string, callback?: ((index: number, value: T) => void) | object | string, thisArg?: any) => any; + each(collection: ArrayLike, iteratee?: (index: number, value: T) => void, thisArg?: any): ArrayLike; + each(collection: T, iteratee?: (index: K, value: T[K]) => void, thisArg?: any): T; + each(collection: T, iteratee?: any, thisArg?: any): T; map: (collection: T[] | object | string | null | undefined, callback?: ((index: number, value: T) => U) | object | string, thisArg?: any) => U[];