import { UnionToIntersection, Stringify } from './types.js'; type Pretty = { [P in keyof T]: T[P]; } & {}; type NestedObject = { [_: ObjectKey]: T | NestedObject; }; /** * Flattening an object * input * const a = { * b: { c: 'd' } * } * * output * const a = { * b.c: 'd' * } */ declare function flattenObject>(object: T2): FlattenObject; /** * Flattening an object * input * const a = { * b: { c: 'd' } * } * * output * const a = { * b.c: 'd' * } */ type FlattenObject = UnionToIntersection ? Key extends string | number ? T[Key] extends NestedObject ? FlattenObject : `${RestKey}.${Stringify}`> : Record : `${RestKey}.${Stringify}`, T[Key]> : never : never>; export { FlattenObject, NestedObject, Pretty, flattenObject };