Thanks to visit codestin.com
Credit goes to github.com

Skip to content

vue-tsc thinks the value of the click event is a mouse event #2019

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

Closed
azat-io opened this issue Oct 14, 2022 · 1 comment
Closed

vue-tsc thinks the value of the click event is a mouse event #2019

azat-io opened this issue Oct 14, 2022 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@azat-io
Copy link

azat-io commented Oct 14, 2022

image

Here is my code:

<script lang="ts" setup>
let handleClick = () => {
  return null
}
</script>

<template>
  <button @click="handleClick">Click me</button>
</template>
pnpm exec vue-tsc --noEmit --pretty
components/button.vue:8:12 - error TS2322: Type '() => null' is not assignable to type 'MouseEvent'.

8   <button @click="handleClick">Click me</button>
             ~~~~~

This issue seems to be relevant since version 1.0.2

@johnsoncodehk
Copy link
Member

Duplicate of #1985

@johnsoncodehk johnsoncodehk marked this as a duplicate of #1985 Oct 14, 2022
@johnsoncodehk johnsoncodehk added the duplicate This issue or pull request already exists label Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants