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

Compile Private to # #44316

Closed
Graham-Beer opened this issue May 28, 2021 · 3 comments
Closed

Compile Private to # #44316

Graham-Beer opened this issue May 28, 2021 · 3 comments

Comments

@Graham-Beer
Copy link

Suggestion

Would be nice if the TypeScript compiler could change the keyword Private to # for JavaScript. I think this feature would allow for cleaner looking code in TypeScript.

Summary

This is a small change to the compiler when compiled down to JavaScript.

@MartinJohns
Copy link
Contributor

This was discussed over and over already, with the clear stance to remain with the existing solution. It's your choice to either use private or #, each with its own functionality.

This is a small change to the compiler when compiled down to JavaScript.

And it would be a heavy breaking change.

@whzx5byb
Copy link

Is it going to be supported in the form of a transformer , turning private bar into #bar?

definitely "no" because that would require type-directed emit.

See #31670

@Graham-Beer
Copy link
Author

Noted update, will close issue.

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

No branches or pull requests

3 participants