← TypeScript, Lightly
Lesson 1 · puzzle TypeScript, Lightly
Types & Inference
Let TypeScript infer, and annotate only where it helps.
Before you start
The goal isn't to annotate everything — it's to annotate boundaries. Function parameters, return types on public APIs, and data coming in from the network. Inside a function, inference is usually better than what you'd write by hand.
5 exercises·up to 70 XP·5/5 hearts