Solution to this question How can I merge properties of two JavaScript objects dynamically? explained me how to use spread operator
to concatenate two objects in Typescript. But I can't still figure out what will be the type of the object created? I tried
let merged: {o1: obj1, o2: obj2}
but it still gives error Property 'x' does not exist on type {o1: obj1, o2: obj2}
. So is there any way we can define type of object created by concatenation?