Browse Source

Merge pull request #1136 in VISUAL/fineui from ~ALAN/fineui:master to master

* commit '4135723e6fe734d049d75bf112020a347cd7983c':
  fix: 修改泛型写法
  fix: 无jira任务,完善泛型。
es6
alan 5 years ago
parent
commit
da5cefa788
  1. 8
      typescript/core/base.ts

8
typescript/core/base.ts

@ -38,13 +38,13 @@ export interface _base {
size: (collection: any[]|object|string) => number;
each: <T>(collection: any[]|object|string, callback?: ((index: number, value: T) => void)|object|string, thisArg?: any) => any;
each: <T>(collection: T[]|object|string, callback?: ((index: number, value: T) => void)|object|string, thisArg?: any) => any;
map: <T>(collection: any[]|object|string, callback?: ((index: number, value: T) => any)|object|string, thisArg?: any) => any[];
map: <T, U>(collection: T[]|object|string, callback?: ((index: number, value: T) => U)|object|string, thisArg?: any) => U[];
reduce: <T>(collection: any[]|object|string, callback?: ((total: any, currentValue: T, currentIndex: number) => any)|object|string, thisArg?: any) => any;
reduce: <T, U>(collection: T[]|object|string, callback?: ((total: U extends T ? U : T, currentValue: T, currentIndex: number) => U extends T ? U : T)|object|string, initialValue?: U|T) => U extends T ? U : T;
reduceRight: <T>(collection: any[]|object|string, callback?: ((total: any, currentValue: T, currentIndex: number) => any)|object|string, thisArg?: any) => any;
reduceRight: <T, U>(collection: T[]|object|string, callback?: ((total: U extends T ? U : T, currentValue: T, currentIndex: number) => U extends T ? U : T)|object|string, initialValue?: U|T) => U extends T ? U : T;
find: <T>(collection: T[]|object|string, callback?: ((index: number, value: T) => boolean)|object|string, thisArg?: any) => any;

Loading…
Cancel
Save