Skip to content

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

@minht11

Description

@minht11

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions