Skip to content

Compatible with tsconfig allowArbitraryExtensions option #5366

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

Open
Teages opened this issue May 16, 2025 · 0 comments
Open

Compatible with tsconfig allowArbitraryExtensions option #5366

Teages opened this issue May 16, 2025 · 0 comments

Comments

@Teages
Copy link

Teages commented May 16, 2025

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

  1. enable allowArbitraryExtensions in tsconfig.json
  2. create two files: WithType.vue, WithType.d.vue.ts, add a type export in WithType.d.vue.ts
  3. 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

microsoft/TypeScript#50133

vuejs/core#13301

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

No branches or pull requests

2 participants