ts-prime
Version:
A utility library for JavaScript and Typescript.
25 lines • 762 B
TypeScript
/**
* Merges two objects. The same as `Object.assign`.
* `b` object will override properties of `a`.
* @param a the first object
* @param b the second object
* @signature
* P.merge(a, b)
* @example
* P.merge({ x: 1, y: 2 }, { y: 10, z: 2 }) // => { x: 1, y: 10, z: 2 }
* @data_first
* @category Object
*/
export declare function merge<A, B>(a: A, b: B): A & B;
/**
* Merges two objects. The same as `Object.assign`. `b` object will override properties of `a`.
* @param b the second object
* @signature
* P.merge(b)(a)
* @example
* P.merge({ y: 10, z: 2 })({ x: 1, y: 2 }) // => { x: 1, y: 10, z: 2 }
* @data_last
* @category Object
*/
export declare function merge<A, B>(b: B): (a: A) => A & B;
//# sourceMappingURL=merge.d.ts.map