Auto-import in JSDoc always uses `ts` behaviour
Vue - Official extension or vue-tsc version
v2.0.26
VSCode version
1.91.0
Vue version
latest
TypeScript version
5.5.2
System Info
No response
Steps to reproduce
In reproduction repo:
- Open
exampleLangJs.vue - Trigger import suggestions on
MyTypeJSDoc comment
- Accept first entry
What is expected?
Imports from JSDoc in <script lang="js">/ <script> work like in regular js file:
You can check this in reproduction repo:
-
Without
@importcomment -
With
@importcomment
What is actually happening?
Whole d.ts/ts file is imported
Link to minimal reproduction
https://github.com/ilanaya/volar-starter
Any additional comments?
No response
I think this is caused by TS getNewImportFixes function identifying the .js extension instead of LanguageServiceHost.getScriptKind.
https://github.com/microsoft/TypeScript/blob/903e82b368c8328dba95b70b21415e7a48339857/src/services/codefixes/importFixes.ts#L1168
Please track https://github.com/microsoft/TypeScript/pull/62840 and consider reopening an issue in the TypeScript repository, thanks.