|
|
|
|
|
by zdragnar
480 days ago
|
|
Seeing posts like these, I often feel alone preferring enums to string unions. There are certain situations where refactoring a string in a union will not work but refactoring an enum will. I don't want to type strings when, semantically, what I want is a discrete type. I don't even care that they become strings in JS, because I'm using them for the semantic and type benefits, not the benefits that come with the string prototype. |
|