-
Notifications
You must be signed in to change notification settings - Fork 12.8k
private mode #56171
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
Comments
This is working as intended. If you want ES2022 private properties you must use |
use # in type script so what is the point of using private key bro... nahh, |
|
so writing jacascript in typescript is better , its worthless to use private key waste of typing... |
Duplicates #31670 |
Thanks bro |
🔎 Search Terms
private property in a class
🕗 Version & Regression Information
⏯ Playground Link
No response
💻 Code
class Person {
private Name : string;
constructure(name : string){
this.Name = name
} }
🙁 Actual behavior
the problem is when we compile into javascript code in ES2022 we have # to make a property private and we cant get access to it
here in typescript even when we configure target to ES2022 , when we compile the above code in javascript file the privacy didnt applied and we can get access to the property and log it ,even the # doesnt appear
🙂 Expected behavior
in javascript we need to have the same result
Additional information about the issue
thanks you
The text was updated successfully, but these errors were encountered: