After reading a helpful solution on StackOverflow about merging properties of JavaScript objects dynamically, I learned how to utilize the spread operator
in Typescript. However, one question still remains unanswered - what will be the type of the object created when two objects are concatenated? I attempted:
let merged: {o1: obj1, o2: obj2}
But unfortunately, I encountered an error stating
Property 'x' does not exist on type {o1: obj1, o2: obj2}
. Is there a method to specify the type of the resulting object after concatenation?