vuejs / language-tools

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

Event listeners type issues after upgrade `'($event: any) => void' is not assignable to type '() => any'` #4387

Closed minht11 closed 4 months ago

minht11 commented 4 months ago

After upgrading to vue-tsc 2.0.18 events fail with error message:

Type '($event: any) => void' is not assignable to type '() => any'.
  Target signature provides too few arguments. Expected 1 or more, but got 0.

Code is nothing special

const emit = defineEmits<(e: 'submit') => void>()
@submit="handler()"

Verified working version 2.0.7

Q16solver commented 4 months ago

Yeah, might be something similar? but now inline dynamic event handlers also seem to be expecting commas instead of semi-colons, which isn't correct unlike before

image