import predicateType from '../helpers/predicateType'; /** * Finds the first element in the given collection that satisfies the provided predicate. * * @template T * @param {T} collection - The collection to iterate over. * @param {Function} [iteratee=identity] - The function invoked per iteration. * @param {number} [fromIndex=0] - The index to start searching from. * @returns {Object} - Returns the found element, else undefined. * * @example * * const users = [ * { 'user': 'barney', 'age': 36, 'active': true }, * { 'user': 'fred', 'age': 40, 'active': false }, * { 'user': 'pebbles', 'age': 1, 'active': true } * ]; * * find(users, o => o.age < 40); * // => { 'user': 'barney', 'age': 36, 'active': true } * * find(users, { 'age': 1, 'active': true }); * // => { 'user': 'pebbles', 'age': 1, 'active': true } * * find(users, 'active'); * // => { 'user': 'barney', 'age': 36, 'active': true } */ declare const find: (collection: T[], iteratee?: predicateType, fromIndex?: number) => Object; export default find;