You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exportconstDec=(): ClassDecorator=>(target)=>{}
@Dec()exportclassTest{// Using this.name and turning off useDefineForClassFields can eliminate runtime errors but need to use @ts-ignorestatica=Test.name}console.log(Test.a)
π Actual behavior
When run compiled javascript file will throw error: Cannot read properties of undefined (reading 'name')
π Expected behavior
console.log(Test.a) // should output 'Test'
possible solution
Remove the following compiled Test_1 variables will become normal
Bug Report
π Search Terms
ES2022 static member
π Version & Regression Information
This is a crash
When a class has a static property and uses the class name when initializing and uses a decorator, an error will be reported at runtime
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
When run compiled javascript file will throw error:
Cannot read properties of undefined (reading 'name')
π Expected behavior
possible solution
Remove the following compiled Test_1 variables will become normal
The text was updated successfully, but these errors were encountered: