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

typescript error with event handlers in tsx #15156

Closed
robozevel opened this issue Oct 14, 2022 · 2 comments
Closed

typescript error with event handlers in tsx #15156

robozevel opened this issue Oct 14, 2022 · 2 comments

Comments

@robozevel
Copy link

Environment

  • Operating System: Linux
  • Node Version: v16.14.2
  • Nuxt Version: 3.0.0-rc.11
  • Nitro Version: 0.5.4
  • Package Manager: npm@7.17.0
  • Builder: vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/github-xemd3s?file=app.tsx

Describe the bug

getting this typescript error when using an onClick handler in a tsx file:

Type '() => void' is not assignable to type 'MouseEvent'.(2322)
runtime-dom.d.ts(1407, 15): The expected type comes from property 'onClick' which is declared here on type 'ElementAttrs'

Additional context

No response

Logs

No response

@cuebit
Copy link
Contributor

cuebit commented Oct 14, 2022

@danielroe
Copy link
Member

This seems to have been resolved upstream.

@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants