diff --git a/typescript/core/base.ts b/typescript/core/base.ts index cc1c637dca..4a6597e4f4 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) => void)|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) => any)|object|string, thisArg?: any) => any[]; - reduce: (collection: any[]|object|string, callback?: Function, accumulator?: any, 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?: Function, accumulator?: any, 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; - 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: T[]) => T; - min: (collection: any[]|object|string, callback?: Function|object|string, thisArg?: any) => any; + min: (collection: T[]) => T; - sortBy: (collection: any[]|object|string, callback?: Function|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?: Function|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?: Function|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?: Function|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;