Unions
7 lessons
- 01UnionsLearn how to allow a value to be one of several types using union types.
- 02Optional ParametersLearn how to define function parameters that are not strictly required.
- 03Default ParametersLearn how to provide fallback values for optional function arguments.
- 04Literal TypesLearn how to constrain variables to specific exact values.
- 05Value UnionsCombine literal types and unions to create powerful custom types.
- 06Template Literal TypesLearn how to use string templates to generate complex literal types.
- 07Giant UnionsUnderstand the performance implications of overly complex union types.