type TAllKeys = T extends any ? keyof T : never; type TIndexValue = T extends any ? K extends keyof T ? T[K] : D : never; type TPartialKeys = Omit & Partial> extends infer O ? { [P in keyof O]: O[P]; } : never; type TFunction = (...a: any[]) => any; type TPrimitives = string | number | boolean | bigint | symbol | Date | TFunction; type TMerged = [T] extends [Array] ? { [K in keyof T]: TMerged; } : [T] extends [TPrimitives] ? T : [T] extends [object] ? TPartialKeys<{ [K in TAllKeys]: TMerged>; }, never> : T; interface IObject { [key: string]: any; } export declare const merge: { (...objects: T): TMerged; options: IOptions; withOptions(options: Partial, ...objects: T): TMerged; }; interface IOptions { /** * When `true`, values explicitly provided as `undefined` will override existing values, though properties that are simply omitted won't affect anything. * When `false`, values explicitly provided as `undefined` won't override existing values. * * Default: `true` */ allowUndefinedOverrides: boolean; /** * When `true` it will merge array properties. * When `false` it will replace array properties with the last instance entirely instead of merging their contents. * * Default: `true` */ mergeArrays: boolean; /** * When `true` it will ensure there are no duplicate array items. * When `false` it will allow duplicates when merging arrays. * * Default: `true` */ uniqueArrayItems: boolean; } export {};