-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Separate "static" private and public fields into a different flag #7111
Comments
Hey @littledan! We really appreciate you taking the time to report an issue. The collaborators If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack |
I'm not sure this is possible at all without splitting it into two separate transforms 🤔 |
I implemented the split in V8 by throwing a syntax error when seeing static fields in the syntax. The actual implementation under that stayed untouched, so most of the work was getting the tests split up properly. |
By the way, about compatibility with existing users of the transform: What if we made two smaller transforms, public-instance-fields and public-static-fields, and made the existing transform alias the combination? |
That shouldn't be a problem, since we already removed the old export-extensions plugin when we split it. |
@nicolo-ribaudo what should we do here? could we close this issue now? |
We can do this, it should be straightforward and non-breaking with the new class-features plugin. @littledan We were planning to have only three flags: "class fields", "private methods" and "decorators". What would you prefer? |
Ok, should we change this issue to a beginner-friendly one? |
Yes 👍 |
At this point, I am not sure if there is much demand for separating out static and instance features. The current split seems fine to me. |
Ok 👍 |
TC39 demoted static private and public field declarations to Stage 2 (PR). They are being pursued in a separate proposal instead. Static fields should be moved to a separate flag which is included in the Stage 2 preset.
The text was updated successfully, but these errors were encountered: