//#region src/array/flatten.d.ts /** * Flattens an array to a specified depth * @param array The array to flatten * @param depth The depth to flatten to (default: 1) * @returns A new flattened array * @example * flatten([1, [2, 3], [4, [5]]]); // [1, 2, 3, 4, [5]] * flatten([1, [2, 3], [4, [5]]], 2); // [1, 2, 3, 4, 5] */ declare function flatten(array: readonly unknown[], depth?: number): T[]; //#endregion export { flatten }; //# sourceMappingURL=flatten.d.mts.map