Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript: use union types instead of enums #179

Closed
slorber opened this issue Apr 1, 2021 · 2 comments · Fixed by #185
Closed

TypeScript: use union types instead of enums #179

slorber opened this issue Apr 1, 2021 · 2 comments · Fixed by #185

Comments

@slorber
Copy link

slorber commented Apr 1, 2021

I'm using latest webpack-merge 5.*

There are a ton of reasons to not use enums in TypeScript anymore (it's not std JS), particularly if you don't even benefit from its nominal typing.

The main one I'd give in this context is that your readme examples do not work out of the box, as it requires to import the enum before being able to use it.

image

image

bebraw added a commit that referenced this issue Jun 7, 2021
@bebraw
Copy link
Member

bebraw commented Jun 7, 2021

Can you check #185 ? To avoid breaking backwards-compatibility, I added strings as an option there so that IDEs shouldn't complain anymore.

@slorber
Copy link
Author

slorber commented Jun 7, 2021

thanks @bebraw , LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants