DEV Community

Discussion on: 5 Commandments for TypeScript programmers

Collapse
 
lexlohr profile image
Alex Lohr

a union of string literal types is good enough

You'll thank me later when you have to change the actual values one day (without having to change the enum's identifier).

Actually, I have to admit I didn't even know that there were other enums than const enums. We live and learn.

Thread Thread
 
miloszpp profile image
Milosz Piechocki

You'll thank me later when you have to change the actual values one day (without having to change the enum's identifier).

Yes, good point :)