TypeScript enthusiasts bid farewell to enums as they become erasable in version 5.8, following their removal from modern JavaScript runtimes like Node.js v23, Deno, and Bun. While critics argue for using literal unions instead due to better ergonomics in most cases, Georges Haidar’s eulogy highlights some strengths of enums – notably clear documentation including deprecation notes on individual members. However, as the industry shifts away from them towards more flexible alternatives like object literals with `const` assertions, hopes lie in potential future support for TSDoc comments on union members by TypeScript developers.
Complete Article after the Jump: Here!