mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-20 13:45:34 -05:00
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.