A union type encompasses an unordered set of unrelated types (that is, types that aren’t subtypes of each other). The following rules govern union types:
• A | B is equivalent to A if B is a subtype of A.
• A | B is equivalent to B | A.
• AB | C is equivalent to A | BC, where AB is A | B and BC is B | C.