Generics Inferencing Breaks with &
extended objects
#5159
Labels
good reproduction ✨
This issue provides a good reproduction, we will be able to investigate it first
🔩 p2-edge-case
Vue - Official extension or vue-tsc version
2.2.0
VSCode version
1.96.4
Vue version
3.5.13
TypeScript version
5.7.3
System Info
package.json dependencies
Steps to reproduce
If you set up a generic component with a type-cast like so:
Then try to use it:
The
as="h2"
will warn you:What is expected?
No type error
What is actually happening?
A type error is given
Link to minimal reproduction
https://stackblitz.com/edit/vitejs-vite-aflytz5e?file=src%2Fmain.js,src%2FHeader.vue&terminal=dev
Any additional comments?
This also happens with the following syntax:
The text was updated successfully, but these errors were encountered: