-
Notifications
You must be signed in to change notification settings - Fork 390
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
feat(extractor): support TS experimental decorators #1517
feat(extractor): support TS experimental decorators #1517
Conversation
} | ||
|
||
// dynamicImport | ||
import('./guy').then(a) | ||
import("./guy").then(a) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prettier change the formatting on save / before commit actions even if this files added as ignored 😬
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
size-limit report 📦
|
9a7ca31
to
9fbd123
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## next #1517 +/- ##
==========================================
+ Coverage 74.12% 74.16% +0.04%
==========================================
Files 67 67
Lines 1863 1866 +3
Branches 490 490
==========================================
+ Hits 1381 1384 +3
Misses 380 380
Partials 102 102
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
// supports typescript legacy decorator on parameters | ||
constructor(@Decorator() param) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
Babel parser since 7.21.0 understand both before and after export decorators, so
decoratorsBeforeExport
parser option is not needed.But for typescript's legacy decorators which could be applied for class method parameters we need to use different parser plugin.
The problem is that these two plugins are not compatible with each other, so user should choose one. Use standardized decorators in theirs typescript code (default behaviour) or experimental (legacy). For JS code standardized decorators are always applied.
This is more or less aligned with upcoming typescript 5 release https://devblogs.microsoft.com/typescript/announcing-typescript-5-0-beta/#decorators
Types of changes
Fixes #1512
Checklist