Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

merge properties of object typescript

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);
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #merge #properties #object #typescript
ADD COMMENT
Topic
Name
3+6 =