Check out example codes for "merge properties of object typescript". It will help you in understanding the concepts better.
Code Example 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);
Learn ReactJs, React Native from akashmittal.com