TypeScript Developer

Case File: One Function, Many Types

Four small helpers (group by, first or fallback, count by, map values) are written with no types, and the only quick fix is any. Use generics so the result type follows the input type: a group of parcels is a group of parcels, a fallback must match the items, and a wrong key function is an error. Real TypeScript in strict mode, generated for you alone.

55 min

Case File: One Function, Many Types

Four small helpers (group by, first or fallback, count by, map values) are written with no types, and the only quick fix is any. Use generics so the result type follows the input type: a group of parcels is a group of parcels, a fallback must match the items, and a wrong key function is an error. Real TypeScript in strict mode, generated for you alone.

In this lesson:

  • typescript
  • generics
  • type-parameters
  • inference
  • utility-functions
  • case-file

๐Ÿ”’ This lesson is part of a paid plan

This lesson is part of the Pro plan. Upgrade to unlock the full lesson, the labs and the exam.

Upgrade Now

This lesson is part of a paid plan

Upgrade to Pro to unlock this course, its labs and its exam.

View Pricing Plans