Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
minht11 opened this issue May 15, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@minht11
Copy link

minht11 commented May 15, 2024

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants