New issue
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
Static decorators are executed at the wrong time #8021
Comments
I don't have time to work on this more, so I'll leave a summary. The PR doesn't work. I suspect this needs to be done outside the class, after it has been declared, similar to how TypeScript and the proposal encourage it. Something like
I suspect that would require a lot of change with the private methods and what not. |
Reopening as I can work on this |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Decorators get hoisted before the class declaration which causes problems when a static function in a class is used to decorate a method.
Input code
Config
Playground link
No response
SWC Info output
No response
Expected behavior
It should work.
Actual behavior
No response
Version
1.3.90
Additional context
No response
The text was updated successfully, but these errors were encountered: