Union types

A union type is a collection of types separated by a |. You can detect a union type in a generic argument with the extends keyword.

Was this page helpful?