Why does the | (Union) operator not work as a logical or?
In the following snippets I would've expected it to see that the
name property is available in 1 of the provided union options? Instead it errors that it can't find name because it is not available in
MyDevice but it is available in the interface provided in the union.
How do you go about conditionally deciding to pick the interface instead of MyDevice when the
name property is available?
I know conditional types exist but that doesn't seem like an option because I'm providing plain interfaces and not types/interfaces with generics.