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
this.foo
I'm not sure what the spec says about this, but flow and babel are out of sync here.
class Foo { a = 42; bar(a = this.a) { console.log(a); } } new Foo().bar()
Flow claims that in the assignment to this.a that this is global. Babel transpiles it to the class instance.
this.a
this
The text was updated successfully, but these errors were encountered:
It should be fixed quite soon, there's an open PR #3334 to fix that!
Sorry, something went wrong.
For posterity, here's my breakdown of the spec confirming Babel's behavior:
thisValue
.
EvaluateDirectCall(func, thisValue, arguments, tailCall).
EvaluateDirectCall
Call ( F, V [ , argumentsList ] )
Call
[[Call]]
PrepareForOrdinaryCall
[[HomeObject]]
super
NewFunctionEnvironment
OrdinaryCallBindThis ( F, calleeContext, thisArgument )
OrdinaryCallEvaluateBody ( F, argumentsList )
OrdinaryCallEvaluateBody
EvaluateBody
FunctionDeclarationInstantiation
d3887c2
No branches or pull requests
I'm not sure what the spec says about this, but flow and babel are out of sync here.
Flow claims that in the assignment to
this.a
thatthis
is global. Babel transpiles it to the class instance.The text was updated successfully, but these errors were encountered: