/** * Recursively merges two objects, combining their properties and nested structures. * * @param target - The base object to merge into. * @param source - The object whose properties will be merged into the target. * @returns A new object containing the merged properties from both inputs. * * @example * // Basic merging * const obj1 = { a: 1, b: 2 }; * const obj2 = { b: 3, c: 4 }; * deepMerge(obj1, obj2); // { a: 1, b: 3, c: 4 } * * @example * // Merging nested objects * const obj1 = { a: 1, b: { c: 2 } }; * const obj2 = { b: { d: 3 }, e: 4 }; * deepMerge(obj1, obj2); // { a: 1, b: { c: 2, d: 3 }, e: 4 } * * @example * // Array concatenation * const obj1 = { items: [1, 2] }; * const obj2 = { items: [3, 4] }; * deepMerge(obj1, obj2); // { items: [1, 2, 3, 4] } * * @example * // Conflicting primitive values (source wins) * const obj1 = { name: 'Alice', age: 25 }; * const obj2 = { age: 30, city: 'NYC' }; * deepMerge(obj1, obj2); // { name: 'Alice', age: 30, city: 'NYC' } * * @example * // Deep nesting * const config1 = { db: { host: 'localhost', port: 5432 } }; * const config2 = { db: { user: 'admin' }, cache: true }; * deepMerge(config1, config2); // { db: { host: 'localhost', port: 5432, user: 'admin' }, cache: true } * * @note Creates a new object; does not modify the input objects. * @note Arrays are concatenated, not recursively merged. * @note Date, RegExp, Map, and Set values are replaced (source wins), not deep-merged. * @note For conflicting primitive values, source overwrites target. * @note Nested plain objects are recursively merged. * @note Useful for configuration merging, state management, default options. * * @complexity Time: O(n) where n is total number of properties across all nesting levels, Space: O(n) */ export declare function deepMerge(target: T, source: U): T & U; //# sourceMappingURL=deepMerge.d.ts.map