Y
Hacker News
new
|
ask
|
show
|
jobs
by
forty
478 days ago
This is my preferred home made way of doing "Enum" in TS theses days
https://gist.github.com/forty/ac392b0413c711eb2d8c628b3e7698...
- it includes syntax to migrate from TS enum.
The member documentation point is a good one, I'll look what can be done with my solution.
1 comments
krona
478 days ago
My enums are almost always numbers, not strings.
link
forty
478 days ago
It should be supported by the above code
link