/** * Flattens array a single level deep. * * @param array - The array to flatten * @returns Returns the new flattened array * * @example * flatten([1, [2, [3, [4]], 5]]); * // => [1, 2, [3, [4]], 5] */ export declare function flatten(array: readonly (T | readonly T[])[]): T[]; /** * Recursively flattens array. * * @param array - The array to flatten * @returns Returns the new flattened array * * @example * flattenDeep([1, [2, [3, [4]], 5]]); * // => [1, 2, 3, 4, 5] */ export declare function flattenDeep(array: readonly any[]): T[]; /** * Recursively flatten array up to depth times. * * @param array - The array to flatten * @param depth - The maximum recursion depth * @returns Returns the new flattened array * * @example * flattenDepth([1, [2, [3, [4]], 5]], 1); * // => [1, 2, [3, [4]], 5] * * flattenDepth([1, [2, [3, [4]], 5]], 2); * // => [1, 2, 3, [4], 5] */ export declare function flattenDepth(array: readonly any[], depth?: number): T[]; /** * Enhanced deep flatten that recursively flattens nested arrays of any depth. * This is an advanced utility beyond standard Lodash. * * @param array - The array to deeply flatten * @returns Returns the completely flattened array * * @example * deepFlatten([1, [2, [3, [4, [5, 6]]]], 7]); * // => [1, 2, 3, 4, 5, 6, 7] */ export declare function deepFlatten(array: readonly any[]): T[];