UNPKG

532 BTypeScriptView Raw
1// Type definitions for array-find-index 1.0
2// Project: https://github.com/sindresorhus/array-find-index
3// Definitions by: Sam Verschueren <https://github.com/samverschueren>
4// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
6declare function arrayFindIndex<T>(arr: T[], predicate: (element: T, index: number, array: T[]) => boolean): number;
7declare function arrayFindIndex<T, U>(arr: T[], predicate: (this: U, element: T, index: number, array: T[]) => boolean, ctx: U): number;
8export = arrayFindIndex;