THE CODE GUARDIAN

Try this lesson

TypeScript · 4 minutes · no sign-up

Trial · 1/7

4 min

Spot the lie

Briefing

The compiler is a colleague

If the type says string and the runtime says null, the type is fiction. Guardians annotate boundaries and refuse to lie about holes.

  • Return types must include reality
  • null is not a string
  • any turns the guardian off