/** * @short * *Find value and index* of the first occurrence of a value according to * some criteria. * * @categories * static index trigger * * @description * Check each value yielded from the iterator against the provided condition. * The index of the last value which happens to satisfy the condition is * returned. If the iterator completes before reaching such value, `-1` is * returned. * * @parameter * condition * (t: T, i: number) => boolean * The criteria used to find a value. A guard is accepted as well. * * @returns * { value: T, index: number } * * @example * j.FindWithIndex( * [a, b, c, d], * x => x == b, * ) * // => { value: b, index: 1 } * * @example * j.FindWithIndex( * [1, 2, 3, 4], * x => x == 6, * ) * // => null * * @example * j.FindWithIndex( * [-2, -1, 0, 1, 2, 3], * x => x > 0, * ) * // => { value: 0, index: 2 } */ export declare function FindWithIndex(iterable: Iterable, condition: (t: T, i: number) => boolean): { value: T; index: number; } | null;