You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I do think this library will be unnecessary for most people who are on 2.4. There are still a few reasons users may still prefer to use this library.
This library provides several helper functions which cannot easy be implemented for native enums. Of these, I would expect Enum.isType to be the most useful. (At least, I don't see an obvious way to implement the helper functions. I will play with it upon release).
Defining a native string enum involves a bit of repetition, as each value must be written twice:
If there are many values, it may be desirable to avoid the repetition and corresponding possibility for typos.
When 2.4 is released, I will add a note to the intro of the readme suggesting that users migrate to native enums and providing a link to this reasoning.
TypeScript 2.4 will introduce native string enums
https://github.com/Microsoft/TypeScript/wiki/What's-new-in-TypeScript#string-enums
Will this library be obsolete? If not, what are the pros/cons of this library versus TypeScript 2.4 native string enums?
thank you
The text was updated successfully, but these errors were encountered: