Learn TypeScript: Union Types
Combine types with unions: accept several types, narrow with typeof, read inferred union return types, type mixed arrays, use common members, and restrict values with literal types.
- Intermediate level
- 1 module
- 7 lessons
- 25 tasks and questions
Syllabus
01Union TypesCombine types with unions: accept values of several types, narrow them with typeof, read union return types, type mixed arrays, use the members all union types share, and restrict values to exact options with literal types.7 lessons