π Search Terms
class field asi
π Version & Regression Information
- This is the behavior in every version I tried
β― Playground Link
https://www.typescriptlang.org/play/?noImplicitAny=false&filetype=js#code/MYGwhgzhAECC0G8BQ1XQOYFMAuK0CoAPACgEpEBfJKoA
π» Code
π Actual behavior
tsc marks the * as an error (Identifier expected.)
π Expected behavior
Given that there cannot be a * after get, ASI kicks in and that code is equivalent to
Additional information about the issue
Firefox also gets this wrong, I submitted a test262 test case: tc39/test262#4189
Also, ASI does not apply to
class A {
get
async x() {}
}
because async is a valid token after get.
π Search Terms
class field asi
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play/?noImplicitAny=false&filetype=js#code/MYGwhgzhAECC0G8BQ1XQOYFMAuK0CoAPACgEpEBfJKoA
π» Code
π Actual behavior
tsc marks the
*as an error (Identifier expected.)π Expected behavior
Given that there cannot be a
*afterget, ASI kicks in and that code is equivalent toAdditional information about the issue
Firefox also gets this wrong, I submitted a test262 test case: tc39/test262#4189
Also, ASI does not apply to
because
asyncis a valid token afterget.