import { Wrappable, Loopable, IterableIterator } from '../../types/iterable'; type Flattened = T extends Array ? U : T extends ReadonlyArray ? U : T extends Loopable ? U : T; declare function flat(depth: 0, source: U): IterableIterator>; declare function flat(depth: 1, source: U): IterableIterator>>; declare function flat(depth: 2, source: U): IterableIterator>>>; declare function flat(depth: 3, source: U): IterableIterator>>>>; declare function flat(depth: 4, source: U): IterableIterator>>>>>; declare function flat(depth: 5, source: U): IterableIterator>>>>>>; declare function flat(depth: 6, source: U): IterableIterator>>>>>>>; declare function flat(depth: 7, source: U): IterableIterator>>>>>>>>; declare function flat(depth: 0): (source: U) => IterableIterator>; declare function flat(depth: 1): (source: U) => IterableIterator>>; declare function flat(depth: 2): (source: U) => IterableIterator>>>; declare function flat(depth: 3): (source: U) => IterableIterator>>>>; declare function flat(depth: 4): (source: U) => IterableIterator>>>>>; declare function flat(depth: 5): (source: U) => IterableIterator>>>>>>; declare function flat(depth: 6): (source: U) => IterableIterator>>>>>>>; declare function flat(depth: 7): (source: U) => IterableIterator>>>>>>>>; declare function flat(shouldFlat: (value: any) => boolean, depth: number, iter: Wrappable): IterableIterator; declare function flat(options: { shouldFlat: (value: any) => boolean; depth?: number; }, iter: Wrappable): IterableIterator; declare function flat(source: Wrappable): IterableIterator; declare function flat(depth: number, source: Wrappable): IterableIterator; declare function flat(depth?: number): (source: Wrappable) => IterableIterator; export { flat };