DEV Community

Omari
Omari

Posted on

2 1 1

Are TypeScript enums Still Bad?

If you search for TypeScript enums online, you’ll see they get a lot of hate. Have there been any improvements to enums over time, or are they still generally frowned upon?

Top comments (2)

Collapse
 
papooch profile image
Ondřej Švanda

All the hate about typescript enums is fueled by people who either never used typescript or intentionally used them wrong (and frankly, most of the proposed "fixes" to them is a bunch of unreadable mess #hot_take). Of course they have some issues, which can be said about virtually all useful things, but if you know how to use them, they are an invaluable feature.

Collapse
 
mistval profile image
Randall

I've never heard that TypeScript enums are bad, and happily use them all the time.

AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay