Open
Description
Vue - Official extension or vue-tsc version
2.2.10
VSCode version
1.100
Vue version
main branch
TypeScript version
>=5.0
Steps to reproduce
- enable allowArbitraryExtensions in
tsconfig.json
- create two files:
WithType.vue
,WithType.d.vue.ts
, add a type export inWithType.d.vue.ts
- try to import the type by
import type { X } from './WithType.vue'
, it throws a error when vue language tools enabled
What is expected?
Language tools should import the type of *.vue
from *.d.vue.ts
as the first choice because allowArbitraryExtensions
is enabled
What is actually happening?
Language tools try to import the type from the script block of *.vue
and got nothing
Link to minimal reproduction
https://github.com/Teages/vue-allow-arbitrary-extensions
Any additional comments?
nuxt/module-builder#597
unjs/mkdist#270
unjs/mkdist#268 (comment)
https://github.com/vuejs/core/blob/v3.5.13/packages/compiler-sfc/src/script/resolveType.ts#L1154