Template literal types

String types can be composed and pattern-matched, which lets you type things like event names and route paths precisely.

Lesson 3.319m 11sIntermediate13k students

Chapters

19:11
  1. 0:00Intro
  2. 1:25String literals refresher
  3. 4:46Template Literal Types
  4. 5:28Expanding Unions
  5. 6:38Operating on objects
  6. 12:33String manipulation types
  7. 13:20Awesome advanced examples

What this lesson covers

  • Compose string types from other types
  • Constrain string shapes such as event or route names
  • Combine template literals with key remapping

This lesson sits in Advanced Types, part of TypeScript for Application Developers. It assumes what came before it and leads directly into the next lesson in the module.

In this lesson you will

  • Compose string types from other types
  • Constrain string shapes such as event or route names
  • Combine template literals with key remapping

Resources