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
I'm using this Flow-enhanced JS:
// @flow class XYZ { x = 5; show(value: number = this.x) { console.log(value); } }
Flow says:
XXX: show(value: number = this.x) { ^ property `x`. Property cannot be accessed on XXX: show(value: number = this.x) { ^^^^ global object
But stripping the types and running this in Chrome works just fine!
class XYZ { constructor() { this.x = 5; } show(value = this.x) { console.log(value); } } new XYZ().show(); // 5
In addition, this MDN example seems to note that this should be the function, not the global scope in default parameters.
this
The text was updated successfully, but these errors were encountered:
Duplicate of #1234
Sorry, something went wrong.
No branches or pull requests
I'm using this Flow-enhanced JS:
Flow says:
But stripping the types and running this in Chrome works just fine!
In addition, this MDN example seems to note that
this
should be the function, not the global scope in default parameters.The text was updated successfully, but these errors were encountered: