import { ListIterator } from '../_internal/ListIterator.js'; import { ListOfRecursiveArraysOrValues } from '../_internal/ListOfRecursiveArraysOrValues.js'; import { ObjectIterator } from '../_internal/ObjectIterator.js'; /** * Creates a flattened array of values by running each element through iteratee and recursively flattening the mapped results. * * @template T * @param {Record | T> | Record | T> | null | undefined} collection - The collection to iterate over. * @returns {T[]} Returns the new deeply flattened array. * * @example * const obj = { a: [[1, 2]], b: [[[3]]] }; * flatMapDeep(obj); * // => [1, 2, 3] */ declare function flatMapDeep(collection: Record | T> | Record | T> | null | undefined): T[]; /** * Creates a flattened array of values by running each element through iteratee and recursively flattening the mapped results. * * @template T, R * @param {ArrayLike | null | undefined} collection - The collection to iterate over. * @param {ListIterator | R>} iteratee - The function invoked per iteration. * @returns {R[]} Returns the new deeply flattened array. * * @example * function duplicate(n) { * return [[[n, n]]]; * } * * flatMapDeep([1, 2], duplicate); * // => [1, 1, 2, 2] */ declare function flatMapDeep(collection: ArrayLike | null | undefined, iteratee: ListIterator | R>): R[]; /** * Creates a flattened array of values by running each element through iteratee and recursively flattening the mapped results. * * @template T, R * @param {T | null | undefined} collection - The object to iterate over. * @param {ObjectIterator | R>} iteratee - The function invoked per iteration. * @returns {R[]} Returns the new deeply flattened array. * * @example * const obj = { a: 1, b: 2 }; * flatMapDeep(obj, (value, key) => [[[key, value]]]); * // => ['a', 1, 'b', 2] */ declare function flatMapDeep(collection: T | null | undefined, iteratee: ObjectIterator | R>): R[]; /** * Creates a flattened array of values by running each element through iteratee and recursively flattening the mapped results. * * @param {object | null | undefined} collection - The collection to iterate over. * @param {string} iteratee - The property name to use as iteratee. * @returns {any[]} Returns the new deeply flattened array. * * @example * const users = [ * { user: 'barney', hobbies: [['hiking', 'coding']] }, * { user: 'fred', hobbies: [['reading']] } * ]; * flatMapDeep(users, 'hobbies'); * // => ['hiking', 'coding', 'reading'] */ declare function flatMapDeep(collection: object | null | undefined, iteratee: string): any[]; /** * Creates a flattened array of values by running each element through iteratee and recursively flattening the mapped results. * * @param {object | null | undefined} collection - The collection to iterate over. * @param {object} iteratee - The object properties to match. * @returns {boolean[]} Returns the new deeply flattened array. * * @example * const users = [ * { user: 'barney', active: [true, false] }, * { user: 'fred', active: [false] } * ]; * flatMapDeep(users, { active: [false] }); * // => [false] */ declare function flatMapDeep(collection: object | null | undefined, iteratee: object): boolean[]; export { flatMapDeep };