If you want to copy the properties of an object to another object in TypeScript you can use the object spread technique as follows:-
Suppose you create an object as follows:-
let laptop1 = {owner : "Jimmy", computerName : "localhost1"}
Later you want to copy those object’s properties to another object then you can use the object spread technique as follows:-
let laptop2 = {brand : "Dell", ...laptop1}
This second object will have its own property plus the properties of the first object.
{ brand: 'Dell', owner: 'Jimmy', computerName: 'localhost1' }
You can copy as many objects’ properties as you need into another object with this same method.
let obj3 = {...obj1, ...obj2};