Closed quantix-dev closed 1 month ago
2.1.6
1.94.2
3.5.12
5.6.3
No response
ref
useTemplateRef
v-for
The vuejs docs provide an example of useTemplateRef with a v-for here which suffers from this issue.
The type should infer an array of the element if the ref is on a v-for to align with the vuejs behaviour https://vuejs.org/guide/essentials/template-refs.html#refs-inside-v-for
The type being inferred is only for one element of the referred element.
Vue - Official extension or vue-tsc version
2.1.6
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
ref
and useuseTemplateRef
in the script tagv-for
The vuejs docs provide an example of
useTemplateRef
with av-for
here which suffers from this issue.What is expected?
The type should infer an array of the element if the ref is on a
v-for
to align with the vuejs behaviour https://vuejs.org/guide/essentials/template-refs.html#refs-inside-v-forWhat is actually happening?
The type being inferred is only for one element of the referred element.
Link to minimal reproduction
No response
Any additional comments?
No response