export function is_object(obj: unknown): boolean; export function is_object_literal(obj: unknown): boolean; export function compare(el1: unknown, el2: unknown): boolean; export function clone(target: T): T; type Merge = T extends [ infer Head extends object, ...infer Tail extends object[] ] ? Tail extends [] ? Head : Merge< [ MergeObjects, ...(Tail extends [infer _, ...infer Rest] ? Rest : []) ] > : never; // type MergeObjects = { // [K in keyof T | keyof U]: K extends keyof T & keyof U // ? T[K] extends object // // Could simplify the code but type negation doesn't seem to work, see // // https://github.com/microsoft/TypeScript/issues/4196 // // https://github.com/microsoft/TypeScript/pull/29317 // // https://github.com/microsoft/TypeScript/issues/4196 // ? U[K] extends object & !Buffer // ? MergeObjects // : T[K] // : U[K] // : K extends keyof T // ? T[K] // : K extends keyof U // ? U[K] // : never; // }; type MergeObjects = { [K in keyof T | keyof U]: K extends keyof T & keyof U ? T[K] extends object ? U[K] extends Buffer ? T[K] : U[K] extends object ? MergeObjects : T[K] : U[K] : K extends keyof T ? T[K] : K extends keyof U ? U[K] : never; }; export function merge(...args: T): Merge; export function mutate(...args: T): Merge; type SnakeCase = S extends `${infer T}${infer U}` ? `${T extends Uppercase ? "_" : ""}${Lowercase}${SnakeCase}` : S; type SnakeCaseKeys = T extends Array ? Array> : T extends object ? { [K in keyof T as SnakeCase]: SnakeCaseKeys; } : T; export function snake_case>( source: T, convert?: boolean | number ): SnakeCaseKeys;