-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
chore(TS) remove enums for string unions when enum is not necessary #8918
Conversation
We could have a second PR in which we explore if common strings used over and over should be a constant. |
Build Stats
|
This PR is also probably fixing most of your extra code in the utils types @ShaMan123 |
i m moving forward with this, i don't see possible disagreemts since it spawned from your question. |
@@ -1,8 +1,4 @@ | |||
export enum GLPrecision { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This enum I liked
But it is ok to remove
I would add the p suffix in our code just to it make it more human and readable...
But I am sure there are legit reasons why not.
Motivation
As per discussion, our use of enums isn't justified.
#8915 (comment)
Enums aren't supposed to be named dictionary of strings, we have union types for that.
There was also a possible bug in the glPrecision code in which we were transforming an object into an array, without knowing in which order we were loopin through precisions test