sequency
Version:
Functional sequences for processing iterable data in JavaScript
12 lines (11 loc) • 389 B
TypeScript
import Sequence from "./Sequence";
export declare class IndexOfFirst {
/**
* Returns the zero-based index of the first element matching the given `predicate` or -1 if no element matches
* the predicate.
*
* @param {(value: T) => boolean} predicate
* @returns {number}
*/
indexOfFirst<T>(this: Sequence<T>, predicate: (value: T) => boolean): number;
}