mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 03:23:08 -06: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.