Haha maybe you are right the title of this article was a bit too aggressive and changed it to We don't have to use Enums on TypeScript anymore?
We don't have to use Enums on TypeScript anymore?
Thanks @firstwhack !
In my example there is no need to make use of index and Union types makes sense in my opinion. And most of the cases, Union types works fine.
As @peerreynders said here, it's trade-offs.
My opinion is, we don't have to use Enums if it's not necessary.
Also
enums are important for readability and re-use
This is your personal opinion and not true for anyone for any cases.
I mean, I prefer Union types to Enums for readability haha.
Thanks you too!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Haha maybe you are right the title of this article was a bit too aggressive and changed it to
We don't have to use Enums on TypeScript anymore?
Thanks @firstwhack !
In my example there is no need to make use of index and Union types makes sense in my opinion. And most of the cases, Union types works fine.
As @peerreynders said here, it's trade-offs.
My opinion is, we don't have to use Enums if it's not necessary.
Also
This is your personal opinion and not true for anyone for any cases.
I mean, I prefer Union types to Enums for readability haha.
Thanks you too!