Browse Source

无JIRA refactor(base): 给findIndex加泛型

es6
Xavier.Meng 2 years ago
parent
commit
686ad06db0
  1. 4
      typescript/core/base.ts

4
typescript/core/base.ts

@ -148,9 +148,9 @@ export interface _base {
takeRight: <T>(array: T[], n: number) => T[]; takeRight: <T>(array: T[], n: number) => T[];
findIndex: (array: any[], value: any, callback?: Function | object | string, thisArg?: any) => number; findIndex: <T>(array: T[], predicate?: ((index: number, item: T, array: T[]) => any) | object | string, thisArg?: any) => number;
findLastIndex: (array: any[], value: any, callback?: Function | object | string, thisArg?: any) => number; findLastIndex: <T>(array: T[], predicate?: ((index: number, item: T, array: T[]) => any) | object | string, thisArg?: any) => number;
makeArray: <T>(length: number, value?: T) => number[] | T[]; makeArray: <T>(length: number, value?: T) => number[] | T[];

Loading…
Cancel
Save