mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-02-04 07:52:51 +00:00
14 lines
569 B
TypeScript
14 lines
569 B
TypeScript
// Type definitions for array-find-index
|
|
// Project: https://github.com/sindresorhus/array-find-index
|
|
// Definitions by: Sam Verschueren <https://github.com/samverschueren>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
declare namespace arrayFindIndex {
|
|
type Predicate = (element: any, index: number, array: any[]) => boolean;
|
|
}
|
|
declare function arrayFindIndex(arr: any[], predicate: arrayFindIndex.Predicate): number;
|
|
declare function arrayFindIndex(arr: any[], predicate: arrayFindIndex.Predicate, ctx: any): number;
|
|
|
|
export = arrayFindIndex;
|
|
|