import type { ErrorReport, OnError } from '../../types/errors.type'; import type { Predicate } from '../../types/find.type'; /** * @description * Use this helper return the index of the first element in the array where predicate is true, and -1 otherwise. * * This function behaves similarly to `Array.prototype.findIndex`, but with added error handling: * - If the predicate throws an error for any element, the error is handled via the onError callback. * - Collects errors in an array and returns it in the report. * - Allows for custom error handling through the onError option. * * @param {Array} collection The array of items to test. * @param {Predicate} predicate A function that tests each element of the array. Called once for each item in the array. * @param {{ onError?: OnError }} options An optional object for error handling. * * @returns {{ index: number; errors: Array> }} The found index or -1 if not found, along with collected errors. */ export declare const safeFindIndexWithErrors: (collection: Array, predicate: Predicate, options?: { onError?: OnError; }) => { index: number; errors: Array>; };