📜  对象打字稿代码示例的合并属性

📅  最后修改于: 2022-03-11 14:48:19.656000             🧑  作者: Mango

代码示例1
const target = { a: 1, b: 2 };
const source = { b: 4, c: 5 };
// Copies source to target object without changing
// target object instance
const returnedTarget = Object.assign(target, source);