export declare function flattenObject<T extends Record<string, any>>(obj: T): FlattenObject<T>;
export declare function inflateObject<T extends Record<string, any>>(obj: T): any extends T ? any : InflateObject<T>;
type Primitive = string | number | boolean;
export type FlattenObject<T, K extends string = ''> = T extends Primitive ? K extends '' ? {} : undefined extends T ? {
    [P in K]?: T;
} : {
    [P in K]: T;
} : T extends any[] ? number extends T['length'] ? FlattenObject<{
    [I in T[number] as `${K}${K extends '' ? '' : '.'}${number}`]: T[number];
}> : MergeObjects<UnionToIntersection<{
    [I in keyof T]: FlattenObject<T[I], `${K}${K extends '' ? '' : '.'}${I & string}`>;
}[number]>> : T extends Record<string, any> ? UnionToIntersection<MergeObjects<{
    [P in keyof T & string]: FlattenObject<T[P], `${K}${K extends '' ? '' : '.'}${P}`>;
}[keyof T & string]>> : {};
type UnflattenPath<K extends string, V> = K extends `${infer First}.${infer Rest}` ? {
    [P in First]: UnflattenPath<Rest, V>;
} : {
    [P in K]: V;
};
type MergeObjects<T> = {
    [K in keyof T]: T[K] extends object ? MergeObjects<T[K]> : T[K] extends string ? string : T[K] extends number ? number : T[K] extends boolean ? boolean : T[K];
};
export type InflateObject<T extends Record<string, any>> = MergeObjects<UnionToIntersection<{
    [K in keyof T]: UnflattenPath<K & string, T[K]>;
}[keyof T]>>;
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
export {};
//# sourceMappingURL=objects.helpers.d.ts.map