vuejs / language-tools

⚡ High-performance Vue language tooling based-on Volar.js
https://marketplace.visualstudio.com/items?itemName=Vue.volar
MIT License
5.83k stars 396 forks source link

Vue-tsc: missing type inference with v-bind="onEvent" syntax #4198

Closed mruthh closed 1 month ago

mruthh commented 6 months ago

When I use v-bind="onEvent" syntax to add an event handler to a Vue component in the template, the $event parameter's type is not inferred correctly. I can work around this by using @event syntax, but there are cases where I would prefer not to have to.

Is this a known limitation, or is it being addressed somewhere?

Vue SFC playground example here

so1ve commented 6 months ago

image

Works on my machine?

mruthh commented 6 months ago

Maybe a config issue then. Is there anything different between your setup and the Vue SFC Playground?