Why TypeScript Enums Are Dead
Node.js v22.6.0+ introduced native TypeScript support through type-stripping, but traditional enums break this workflow because they require code transformation rather than simple type erasure. The solution is using 'as const' objects or type unions instead, which provide the same functionality while remaining fully compatible with Node's erasable-only approach. TypeScript 5.8's --erasableSyntaxOnly flag helps catch compatibility issues during development.