-
-
Notifications
You must be signed in to change notification settings - Fork 719
fix(formatter): handle decorators correctly for class expressions in export #13845
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
fix(formatter): handle decorators correctly for class expressions in export #13845
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Merge activity
|
950eeb5 to
3cf1a41
Compare
2ff5804 to
d0c5b06
Compare
CodSpeed Instrumentation Performance ReportMerging #13845 will not alter performanceComparing Summary
|
…export (#13845) The decorators of class expressions should be printed on the class expression itself; otherwise, the parentheses wouldn't wrap the decorators, which would cause a syntax error. Input: ```ts export default (@dec class {}) {}; ``` Output before: ```ts export default @dec ( class {} ) { } ``` Output after: ```ts export default (@dec class {}) {}
d0c5b06 to
5c3645b
Compare

The decorators of class expressions should be printed on the class expression itself; otherwise, the parentheses wouldn't wrap the decorators, which would cause a syntax error.
Input:
Output before:
Output after: