Browse Source

fix: max 和 min 方法使用泛型

es6
alan 5 years ago
parent
commit
74572ff16e
  1. 4
      typescript/core/base.ts

4
typescript/core/base.ts

@ -58,9 +58,9 @@ export interface _base {
any: <T>(collection: T[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => boolean; any: <T>(collection: T[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => boolean;
max: (collection: any[]) => any; max: <T>(collection: T[]) => T;
min: (collection: any[]) => any; min: <T>(collection: T[]) => T;
sortBy: <T>(collection: any[]|object|string, callback?: ((index: number, value: T) => number)|object|string, thisArg?: any) => any[]; sortBy: <T>(collection: any[]|object|string, callback?: ((index: number, value: T) => number)|object|string, thisArg?: any) => any[];

Loading…
Cancel
Save