beginner40 minby DevFox

Enums: reading them in other people's code, and why modern code prefers literal unions

Read an enum in someone else’s code: a list of names, each standing for a value, like dish numbers on a café menu. Say which number or word each member holds, see why TypeScript accepts an enum while Node refuses to run it, and rewrite it as the union of words TaskKit already uses. Closes Module 7 with its one-page cheat sheet.

  • TypeScript
  • Fundamentals
Enums: reading them in other people's code, and why modern code prefers literal unions. Read this lesson at .