My function is able to accept two different types of objects as arguments
myFunc(arg: (Obj1 | Obj2))
Within my function, I am trying to achieve the following:
let val = ( arg instance of Obj1 ) ? Obj1.propOnlyOnObj1 : Obj2.propOnlyOnObj2;
However, TypeScript throws errors because these properties exist only on one of the object types.