-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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(typescript): Align isolatedDeclaration
implementation with tsc
#9715
base: main
Are you sure you want to change the base?
Conversation
|
thanks for your help❤️️ 😂 got another blocking point of isolatedDeclaration should generate the same error as tsc
I'll open another issue |
CodSpeed Performance ReportMerging #9715 will degrade performances by 3.1%Comparing Summary
Benchmarks breakdown
|
isolatedDeclaration
isolatedDeclaration
isolatedDeclaration
implementation with tsc
isolatedDeclaration
implementation with tscisolatedDeclaration
implementation with tsc
49c2be0
to
533853e
Compare
3c501b0
to
bf3c9b6
Compare
FYI oxc uses immutable AST for a single transform pipeline. |
I see. And I believe swc can also get better performance and other engineering benefits with immutable AST in isolated declaration transformation. After finishing, I have a little bit of regret... But maybe in the next pr 😁. |
Description:
Implementation:
Most code is direct translation of https://github.com/oxc-project/oxc/tree/main/crates/oxc_isolated_declarations. The differences come from:
tsc --declaration --isolatedDeclarations --emitDeclarationOnly --isolatedModules --noResolve --noCheck --strictNullChecks test.ts
. I also reguard those cases where tsc can't compile as undefined behaviors.😅 Actually I find my implementation of point 2 is not too good either. I meet many bad cases after my basic implementation and write many ugly patches. So issues are welcome.
Benchmarks:
Roughly test with https://raw.githubusercontent.com/oxc-project/benchmark-files/main/vue-id.ts under M3Pro.
Known problem:
Related issue (if exists):
closes #9705
closes #9718