Skip to main content

Union TypeCompound Type join by | Type Operator to define each member of Type set can EITHER be

aka Type-Union, Union

Discriminated Union

Union Type with overlapping property of different values

References

  1. [!snippet [Intersection Type](intersection-type) of 2 [**_Union Type`_**](union-type)
type DateTime = Date | string
type Label = string | number
type Combined = DateTime & Label

typeof Combined`](snippet-intersection-type-of-2-union-type-typeof-combined) ↔ string

  1. Discriminated UnionUnion Type with overlapping property of different values

  2. Discriminant ↔ Common Type in Union Type with different values