Description
Vue - Official extension or vue-tsc version
2.2.0
VSCode version
Not using it
Vue version
3.5.13
TypeScript version
5.6.3
System Info
System:
OS: Linux 5.15 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
CPU: (16) x64 12th Gen Intel(R) Core(TM) i7-1260P
Memory: 10.44 GB / 11.68 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 20.12.2 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/bin/yarn
npm: 10.5.0 - /usr/local/bin/npm
pnpm: 9.9.0 - ~/.local/share/pnpm/pnpm
package.json dependencies
{
"dependencies": {
"vue": "^3.5.13"
},
"devDependencies": {
"@tsconfig/node22": "^22.0.0",
"@types/node": "^22.9.3",
"@vitejs/plugin-vue": "^5.2.1",
"@vue/tsconfig": "^0.7.0",
"npm-run-all2": "^7.0.1",
"typescript": "~5.6.3",
"vite": "^6.0.1",
"vite-plugin-vue-devtools": "^7.6.5",
"vue-tsc": "^2.1.10"
}
}
Steps to reproduce
Try to use useSlots/check for slots in template
What is expected?
No error is thrown
What is actually happening?
This condition will always return true since this function is always defined. Did you mean to call it instead?
error
Also, I wasn't able to reproduce it in hello world, but I also had "any" resolution for useSlots and $slots.
Also this is obviously not valid code but the error is weird
We always had slots type resolution error in OAPI with "this assigment will always return true" even though it's by documentation
But it seems like this time it got more broken than before
Link to minimal reproduction
https://github.com/daniluk4000/vue-volar-slots-bug
Any additional comments?
Only happening since 2.2.0. 2.1.10 produces correct errors (if we assume $slots check in OAPI should return this always true error)