A brief introduction to TypeScript's Union (|) and Intersection (&) types. Union types allow a value to be one of several types, with the compiler only exposing properties common to all members. Intersection types combine multiple types into one, merging all their properties. Short code examples illustrate both concepts.
Sort: