Having an array of multiple types defined with union, I end up with the element of type A is allowed have properties of type B, which I\'d like to avoid.
type