We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
1.1.29
Windows
class Points { #points: Array;
constructor(points: Array<Number>) { this.#points = points; } length() { return this.#points.length; }
}
let p = new Points([1, 2, 3]); console.log(p.length()); console.log(p.#points);
/* The error I get is 15 | console.log(p.#points); ^ error: Expected identifier but found "#points" at C:\Users\berzi\Documents\testpoints.ts:15:15
15 | console.log(p.#points); ^ error: Expected ")" but found ";" at C:\Users\berzi\Documents\testpoints.ts:15:23
Bun v1.1.29 (Windows x64)
*/
With tsc, the error is very clear
testpoints.ts:15:15 - error TS18013: Property '#points' is not accessible outside class 'Points' because it has a private identifier.
15 console.log(p.#points); ~~~~~~~
Found 1 error in testpoints.ts:15
No response
The text was updated successfully, but these errors were encountered:
yeah this error is not good
Sorry, something went wrong.
No branches or pull requests
What version of Bun is running?
1.1.29
What platform is your computer?
Windows
What steps can reproduce the bug?
class Points {
#points: Array;
}
let p = new Points([1, 2, 3]);
console.log(p.length());
console.log(p.#points);
/* The error I get is
15 | console.log(p.#points);
^
error: Expected identifier but found "#points"
at C:\Users\berzi\Documents\testpoints.ts:15:15
15 | console.log(p.#points);
^
error: Expected ")" but found ";"
at C:\Users\berzi\Documents\testpoints.ts:15:23
Bun v1.1.29 (Windows x64)
*/
What is the expected behavior?
With tsc, the error is very clear
testpoints.ts:15:15 - error TS18013: Property '#points' is not accessible outside class 'Points' because it has a private identifier.
15 console.log(p.#points);
~~~~~~~
Found 1 error in testpoints.ts:15
What do you see instead?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: