v-for typing issues #4958
Labels
duplicate
This issue or pull request already exists
good reproduction ✨
This issue provides a good reproduction, we will be able to investigate it first
Vue - Official extension or vue-tsc version
2.1.8
VSCode version
1.94.2
Vue version
3.5.12
TypeScript version
5.6.3
System Info
No response
package.json dependencies
No response
Steps to reproduce
Create a component with the following in it:
What is expected?
The typing should be correct
What is actually happening?
items
is typed asFoo[]
which is correct.item
is simplified which is causing the issue. I believe it might be typed asReactive<Foo>
which may be breaking the typing.Here is the error I'm getting:
Link to minimal reproduction
No response
Any additional comments?
I've notice there are a few issues I've found with generic components as well. I've seen issues with v-for and slots where functions expecting a particular type aren't working. They usually have types like
UnwrapRef<T>
orReactive<T>
.The text was updated successfully, but these errors were encountered: