TypeScript, Lightly

Lesson 3 · puzzle TypeScript, Lightly

Generics Without Fear

Read and write the generics that appear in real client code.

Before you start

A generic is a type parameter — a placeholder the caller fills in. Array<T> is one you already use. The version you'll write most is a function whose return type depends on its input, like a typed fetch wrapper.

5 exercises·up to 72 XP·5/5 hearts