Skip to content
0/9

TypeScript Basics: JavaScript with Types

Union Types and Narrowing

In this lesson you will

  • Write union and literal types
  • Narrow a union with typeof, equality and in checks
  • Use as const and a simple enum alternative