Browse Source

Merge pull request #208388 in DEC/fineui from master to feature/x

* commit '3b57021f66d7755004e4db21d4ff928e1220a33f':
  无JIRA refactor(each): 加个重载
master
superman 2 years ago
parent
commit
4a2c583602
  1. 4
      typescript/core/base.ts

4
typescript/core/base.ts

@ -38,7 +38,9 @@ export interface _base {
size: (collection: any) => number; 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[]; map: <T, U>(collection: T[] | object | string | null | undefined, callback?: ((index: number, value: T) => U) | object | string, thisArg?: any) => U[];

Loading…
Cancel
Save