$attrs
or ReturnType<typeof useAttrs()>
is always Data
when fallthroughAttributes: true
#5008
Labels
feature request
Request new features
Vue - Official extension or vue-tsc version
2.1.10
VSCode version
1.95.3
Vue version
3.5.12
TypeScript version
5.6.3
System Info
No response
package.json dependencies
Steps to reproduce
attrs
: the type will beData
instead ofButtonHTMLAttributes
npm run check
: You will see thatWhat is expected?
The type of the fallthrough attributes should be
Data
when there is nov-bind="$attrs"
assigned to an element. But when it is assigned, it should be of the assigned element's attributes type.What is actually happening?
The type of the fallthrough attributes always is
Data
, both onuseAttrs
and$attrs
.Link to minimal reproduction
https://stackblitz.com/edit/vue3-vite-typescript-starter-aahszk?file=src%2Fcomponents%2FVButton.vue
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: