Closed
Description
Vue - Official extension or vue-tsc version
vue-tsc 2.2.10
VSCode version
N/A
Vue version
3.5.17
TypeScript version
5.8.0
System Info
System:
OS: macOS 15.5
CPU: (10) arm64 Apple M4
Memory: 336.75 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.10.0 - ~/.nvm/versions/node/v22.10.0/bin/node
Yarn: 1.22.22 - ~/.nvm/versions/node/v22.10.0/bin/yarn
npm: 10.9.0 - ~/.nvm/versions/node/v22.10.0/bin/npm
pnpm: 9.15.4 - ~/.nvm/versions/node/v22.10.0/bin/pnpm
bun: 1.2.15 - ~/.bun/bin/bun
package.json dependencies
"dependencies": {
"vue": "^3.5.17"
},
"devDependencies": {
"@tsconfig/node22": "^22.0.2",
"@types/node": "^22.15.32",
"@vitejs/plugin-vue": "^6.0.0",
"@vue/tsconfig": "^0.7.0",
"npm-run-all2": "^8.0.4",
"typescript": "~5.8.0",
"vite": "^7.0.0",
"vite-plugin-vue-devtools": "^7.7.7",
"vue-tsc": "^2.2.10"
}
Steps to reproduce
- Clone https://github.com/MikeBellika/fallthrough-type-error
- Install dependencies with
pnpm install
- Run
pnpm type-check
What is expected?
There should be no type errors in the reproduction repo, as MyComponent
defines the prop status
.
What is actually happening?
The type $props
type of MyComponent
is inferred as
Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>
This causes a type error in App.vue
, since it's using the status
prop.
Link to minimal reproduction
https://github.com/MikeBellika/fallthrough-type-error
Any additional comments?
This only happens when:
- The component with props (MyComponent.vue) has multiple root nodes AND
- The component does not use
defineModel
ordefineEmits
. Notice that there are no issues withMyComponentWithModel
No type error with vue 3.5.10, seems like it started in 3.5.11