Browse Source

Pull request #3229: 无JIRA refactor(each): 加个重载

Merge in VISUAL/fineui from ~XAVIER.MENG/fineui:master to master

* commit '2b4c5600dff49eed1d4effc6c3515fab77f79928':
  无JIRA refactor(each): 加个重载
es6
Xavier.Meng-孟宇翔 2 years ago
parent
commit
3b57021f66
  1. 4
      typescript/core/base.ts

4
typescript/core/base.ts

@ -38,7 +38,9 @@ export interface _base {
size: (collection: any) => number;
each: <T>(collection: T[] | object | string, callback?: ((index: number, value: T) => void) | object | string, thisArg?: any) => any;
each<T>(collection: ArrayLike<T>, iteratee?: (index: number, value: T) => void, thisArg?: any): ArrayLike<T>;
each<T extends object, K extends keyof T>(collection: T, iteratee?: (index: K, value: T[K]) => void, thisArg?: any): T;
each<T>(collection: T, iteratee?: any, thisArg?: any): T;
map: <T, U>(collection: T[] | object | string | null | undefined, callback?: ((index: number, value: T) => U) | object | string, thisArg?: any) => U[];

Loading…
Cancel
Save