The post discusses the usage of TypeScript enums and explores the arguments against their use. It also presents alternatives to TypeScript enums and recommends string enums as a better choice.

8m read timeFrom blog.theodo.com
Post cover image
Table of contents
🤺 Are TypeScript Enums Really Harmful?❓ What are Enums anyway?👎 Why shouldn’t you use Enums?🦸 POJO Enums to the rescue!🤔 POJO Enums aren’t perfect🧵 My Personal Choice - String Enums🧅 But what about Union Types?🧶 Ok, so should we always use String Enums?🚪 Closing Thoughts

Sort: