Open oleg-mtr opened 5 years ago
Workaround R.mergeDeepWith((a, b) => b, a, b)
import * as R from "ramda";
interface ITest {
foo: string[];
bar: string;
}
const a: ITest = {foo: ["1"], bar: "2"};
const b: ITest = {foo: ["3"], bar: "4"};
const c: ITest = R.mergeDeepRight(a, b) as ITest; // `as` to prevent TS error
const d: ITest = R.mergeDeepWith((a, b) => b, a, b);
console.log(c);
console.log(d);
{ foo: [ '3' ], bar: '4' }
{ foo: [ '3' ], bar: '4' }