-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Incorrect decorator transformation #11744
Copy link
Copy link
Open
Labels
Description
Describe the bug
The static property of ES6 class which is inherited by decorator function is incorrectly transformed.
Input code
function Component(target) {
return class subTarget extends target {};
}
@Component
class ScrollView {
static scrollInterval = 100;
autoScroll() {
console.log(ScrollView.scrollInterval)
}
}
new ScrollView().autoScroll();Config
Link to the code that reproduces this issue
SWC Info output
No response
Expected behavior
the 100 is supposed to be printed
Actual behavior
the undefined is printed
Version
1.15.21
Additional context
No response
Reactions are currently unavailable