Skip to content

fix(typescript): improve accuracy of runTsc extensions parameter behavior#222

Merged
johnsoncodehk merged 3 commits intomasterfrom
tsc-exts
Jul 4, 2024
Merged

fix(typescript): improve accuracy of runTsc extensions parameter behavior#222
johnsoncodehk merged 3 commits intomasterfrom
tsc-exts

Conversation

@johnsoncodehk
Copy link
Member

@johnsoncodehk johnsoncodehk commented Jul 4, 2024

This PR will solve the error TS5055: Cannot write file 'xxx/yyy.vue.d.ts' because it would overwrite input file. error, and the problem that --clean cannot clean the .vue.d.ts file.

Details

  • extra extensions need to be added to the first group of supportedTSExtensions, which will make tsc think that .vue and .vue.d.ts are associated file types, thus solving the problem that .vue and .vue.d.ts are considered multiple source file problem.
  • Extra extensions need to be located in front of .d.ts. tsc depends on the order to determine the priority of .vue and .vue.d.ts.
  • Patch changeExtension to resolve tsc not knowing it should convert xxx.vue to xxx.vue.d.ts instead of xxx.d.ts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant