Caffeinated Coder
Book an appointment
Lesson 15 · Advanced and in practice

Strict mode

Strict mode is one line in tsconfig.json, "strict": true, that turns on a family of 9 stricter checks. Follow a six-line program that passes tsc with strict off and then crashes with a TypeError, and watch two of those checks, noImplicitAny and strictNullChecks, point at the exact lines before it runs. Handling the missing case makes it print NOBODY.

10 min9 steps5 questionsBeginner
Fig 15 · Interactive
Loading figure…
or ← →

Quiz Unlocks after the last step.