type Func = (v1: T1[keyof T1] | T2[keyof T2], v2: T1[keyof T1] | T2[keyof T2], k: keyof (T1 & T2), t1: T1, t2: T2) => R; interface MergeWith { (fn: Func, a: T1, b: T2): Record; (fn: Func, a: T1): (b: T2) => Record; (fn: Func): { (a: T1, b: T2): Record; (a: T1): (b: T2) => Record; (...args: T[]): Record; }; (fn: Func, ...args: T[]): Record; } /** * Create a new object with the own properties of the first object merged with * the own properties of the others objects. If a key exists in several objects * provided `fn` will be called and should return resolve value * * @param {Function} fn function to call if prop conflict appear. Receives three argument, `valueLeft`, `valueRight`, * `key`, `leftObj`, `rightObj`. * @param {...Object} sources * @return {Object} * @example * * mergeWith((x, y) => x + y, { 'name': 'fred', 'age': 10 }, { 'age': 40 }); //=> { 'name': 'fred', 'age': 50 } */ declare const _default: MergeWith; export default _default;