From 87ed13f50b70ba58f254957bac72c77dd619abd2 Mon Sep 17 00:00:00 2001 From: alan Date: Thu, 29 Aug 2019 11:25:49 +0800 Subject: [PATCH 1/5] =?UTF-8?q?fix:=20=E6=97=A0jira=E4=BB=BB=E5=8A=A1=20?= =?UTF-8?q?=E5=B0=BD=E9=87=8F=E4=BD=BF=E7=94=A8=E6=B3=9B=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/core/base.ts | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/typescript/core/base.ts b/typescript/core/base.ts index cc1c637dca..92797bcd5f 100644 --- a/typescript/core/base.ts +++ b/typescript/core/base.ts @@ -36,39 +36,39 @@ export interface _base { size: (collection: any[]|object|string) => number; - each: (collection: any[]|object|string, callback?: Function, thisArg?: any) => any; + each: (collection: any[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => any; - map: (collection: any[]|object|string, callback?: Function|object|string, thisArg?: any) => any[]; + map: (collection: any[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => any[]; - reduce: (collection: any[]|object|string, callback?: Function, accumulator?: any, thisArg?: any) => any; + reduce: (collection: any[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => any; - reduceRight: (collection: any[]|object|string, callback?: Function, accumulator?: any, thisArg?: any) => any; + reduceRight: (collection: any[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => any; find: (collection: T[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => any; - filter: (collection: any[]|object|string, callback?: Function|object|string, thisArg?: any) => any[]; + filter: (collection: T[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => any[]; - reject: (collection: any[]|object|string, callback?: Function|object|string, thisArg?: any) => any[]; + reject: (collection: any[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => any[]; - every: (collection: any[]|object|string, callback?: Function|object|string, thisArg?: any) => boolean; + every: (collection: any[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => boolean; - all: (collection: any[]|object|string, callback?: Function|object|string, thisArg?: any) => boolean; + all: (collection: any[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => boolean; - some: (collection: any[]|object|string, callback?: Function|object|string, thisArg?: any) => boolean; + some: (collection: any[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => boolean; any: (collection: T[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => boolean; - max: (collection: any[]|object|string, callback?: Function|object|string, thisArg?: any) => any; + max: (collection: any[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => any; - min: (collection: any[]|object|string, callback?: Function|object|string, thisArg?: any) => any; + min: (collection: any[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => any; - sortBy: (collection: any[]|object|string, callback?: Function|object|string, thisArg?: any) => any[]; + sortBy: (collection: any[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => any[]; - groupBy: (collection: any[]|object|string, callback?: Function|object|string, thisArg?: any) => object; + groupBy: (collection: any[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => object; - indexBy: (collection: any[]|object|string, callback?: Function|object|string, thisArg?: any) => object; + indexBy: (collection: any[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => object; - countBy: (collection: any[]|object|string, callback?: Function|object|string, thisArg?: any) => object; + countBy: (collection: any[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => object; count: (from: number, to: number, predicate: Function) => number; From 250bc4c9d5f4b537a3b30b824efe159e031cb01f Mon Sep 17 00:00:00 2001 From: alan Date: Thu, 29 Aug 2019 11:28:54 +0800 Subject: [PATCH 2/5] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/core/base.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/typescript/core/base.ts b/typescript/core/base.ts index 92797bcd5f..b9857f8b80 100644 --- a/typescript/core/base.ts +++ b/typescript/core/base.ts @@ -36,13 +36,13 @@ export interface _base { size: (collection: any[]|object|string) => number; - each: (collection: any[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => any; + each: (collection: any[]|object|string, callback?: ((index: number, value: T) => void)|object|string, thisArg?: any) => any; - map: (collection: any[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => any[]; + map: (collection: any[]|object|string, callback?: ((index: number, value: T) => any)|object|string, thisArg?: any) => any[]; - reduce: (collection: any[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => any; + reduce: (collection: any[]|object|string, callback?: ((index: number, value: T) => any)|object|string, thisArg?: any) => any; - reduceRight: (collection: any[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => any; + reduceRight: (collection: any[]|object|string, callback?: ((index: number, value: T) => any)|object|string, thisArg?: any) => any; find: (collection: T[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => any; @@ -58,17 +58,17 @@ export interface _base { any: (collection: T[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => boolean; - max: (collection: any[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => any; + max: (collection: any[]|object|string, callback?: ((index: number, value: T) => any)|object|string, thisArg?: any) => any; - min: (collection: any[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => any; + min: (collection: any[]|object|string, callback?: ((index: number, value: T) => any)|object|string, thisArg?: any) => any; - sortBy: (collection: any[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => any[]; + sortBy: (collection: any[]|object|string, callback?: ((index: number, value: T) => any)|object|string, thisArg?: any) => any[]; - groupBy: (collection: any[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => object; + groupBy: (collection: any[]|object|string, callback?: ((index: number, value: T) => any)|object|string, thisArg?: any) => object; - indexBy: (collection: any[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => object; + indexBy: (collection: any[]|object|string, callback?: ((index: number, value: T) => any)|object|string, thisArg?: any) => object; - countBy: (collection: any[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => object; + countBy: (collection: any[]|object|string, callback?: ((index: number, value: T) => any)|object|string, thisArg?: any) => object; count: (from: number, to: number, predicate: Function) => number; From 687b997b596824cb48a073eb207d601ce74030bd Mon Sep 17 00:00:00 2001 From: alan Date: Thu, 29 Aug 2019 11:54:22 +0800 Subject: [PATCH 3/5] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/core/base.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/typescript/core/base.ts b/typescript/core/base.ts index b9857f8b80..e9fe1c6bd9 100644 --- a/typescript/core/base.ts +++ b/typescript/core/base.ts @@ -40,9 +40,9 @@ export interface _base { map: (collection: any[]|object|string, callback?: ((index: number, value: T) => any)|object|string, thisArg?: any) => any[]; - reduce: (collection: any[]|object|string, callback?: ((index: number, value: T) => any)|object|string, thisArg?: any) => any; + reduce: (collection: any[]|object|string, callback?: ((total: any, currentValue: T, currentIndex: number) => any)|object|string, thisArg?: any) => any; - reduceRight: (collection: any[]|object|string, callback?: ((index: number, value: T) => any)|object|string, thisArg?: any) => any; + reduceRight: (collection: any[]|object|string, callback?: ((total: any, currentValue: T, currentIndex: number) => any)|object|string, thisArg?: any) => any; find: (collection: T[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => any; @@ -62,7 +62,7 @@ export interface _base { min: (collection: any[]|object|string, callback?: ((index: number, value: T) => any)|object|string, thisArg?: any) => any; - sortBy: (collection: any[]|object|string, callback?: ((index: number, value: T) => any)|object|string, thisArg?: any) => any[]; + sortBy: (collection: any[]|object|string, callback?: ((firstEl:T, secondEl:T) => number)|object|string, thisArg?: any) => any[]; groupBy: (collection: any[]|object|string, callback?: ((index: number, value: T) => any)|object|string, thisArg?: any) => object; From 8ea54fcc84712fc09527a1fa025029c02710f449 Mon Sep 17 00:00:00 2001 From: alan Date: Thu, 29 Aug 2019 13:48:50 +0800 Subject: [PATCH 4/5] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/core/base.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/typescript/core/base.ts b/typescript/core/base.ts index e9fe1c6bd9..b4868daa2a 100644 --- a/typescript/core/base.ts +++ b/typescript/core/base.ts @@ -58,11 +58,11 @@ export interface _base { any: (collection: T[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => boolean; - max: (collection: any[]|object|string, callback?: ((index: number, value: T) => any)|object|string, thisArg?: any) => any; + max: (collection: any[]) => any; - min: (collection: any[]|object|string, callback?: ((index: number, value: T) => any)|object|string, thisArg?: any) => any; + min: (collection: any[]) => any; - sortBy: (collection: any[]|object|string, callback?: ((firstEl:T, secondEl:T) => number)|object|string, thisArg?: any) => any[]; + sortBy: (collection: any[]|object|string, callback?: ((index: number, value: T) => number)|object|string, thisArg?: any) => any[]; groupBy: (collection: any[]|object|string, callback?: ((index: number, value: T) => any)|object|string, thisArg?: any) => object; From 74572ff16e8e43bef1d3c8da7ad3dd5ee1992e8e Mon Sep 17 00:00:00 2001 From: alan Date: Thu, 29 Aug 2019 14:03:13 +0800 Subject: [PATCH 5/5] =?UTF-8?q?fix:=20max=20=E5=92=8C=20min=20=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E4=BD=BF=E7=94=A8=E6=B3=9B=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typescript/core/base.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/typescript/core/base.ts b/typescript/core/base.ts index b4868daa2a..4a6597e4f4 100644 --- a/typescript/core/base.ts +++ b/typescript/core/base.ts @@ -58,9 +58,9 @@ export interface _base { any: (collection: T[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => boolean; - max: (collection: any[]) => any; + max: (collection: T[]) => T; - min: (collection: any[]) => any; + min: (collection: T[]) => T; sortBy: (collection: any[]|object|string, callback?: ((index: number, value: T) => number)|object|string, thisArg?: any) => any[];