beginner35 minby DevFox

Literal types and unions of literals ("todo" | "done")

Give a value a type made of a few exact words, like a spreadsheet column with a drop-down of todo and done. See TypeScript refuse a misspelled word before anything runs, read its guess when only a capital letter is wrong, learn why a let box gets string instead, and give every TaskKit task a status.

  • TypeScript
  • Fundamentals
Literal types and unions of literals (`"todo" | "done"`). Read this lesson at .