2025-09-05 14:59:21 +08:00

18 lines
433 B
TypeScript

export interface FlattenOptions {
delimiter?: string;
maxDepth?: number;
safe?: boolean;
transformKey?: (key: string) => string;
}
export function flatten<T, R>(target: T, options?: FlattenOptions): R;
export interface UnflattenOptions {
delimiter?: string;
object?: boolean;
overwrite?: boolean;
transformKey?: (key: string) => string;
}
export function unflatten<T, R>(target: T, options?: UnflattenOptions): R;