language-tools
language-tools copied to clipboard
when both emit and model defined, plus import emit type from another file, component loses type
Vue - Official extension or vue-tsc version
2.1.6
VSCode version
none
Vue version
3.5.3
TypeScript version
5.5.4
System Info
System:
OS: Linux 5.15 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
CPU: (16) x64 AMD Ryzen 7 7800X3D 8-Core Processor
Memory: 40.29 GB / 46.66 GB
Container: Yes
Shell: 5.8.1 - /usr/bin/zsh
Binaries:
Node: 20.17.0 - ~/.n/bin/node
npm: 10.8.2 - ~/.n/bin/npm
pnpm: 9.9.0 - ~/.n/bin/pnpm
bun: 1.0.26 - ~/.bun/bin/bun
package.json dependencies
No response
Steps to reproduce
To reproduce, these requirement has to meet
- Define emits
- Define model
- The emit type extends radix-vue's type
Then the component inside template
will have type of unknown
.
Should be able to reproduce with the repo provided below. Here's some screenshots
What is expected?
Having correct type for components.
What is actually happening?
Infer as unknown
Link to minimal reproduction
https://github.com/RayGuo-ergou/volar-reproduction
Any additional comments?
possible related to https://github.com/vuejs/language-tools/issues/4822 ?
Also the current radix-vue
is built with 2.0.x
so this might caused this issue?