language-tools
language-tools copied to clipboard
Error: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
Versions 2.0.0 and up give me the error: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
in .vue files (in a vanilla vite project).
Version 1.8.27 does not show an error.
Are you using jsx?
No not at all. I'm using the default settings from vite creating a vue page with ts
set as language in the script block:
<script setup lang="ts">
我发现typescript版本如果在5.1.6 就不会报这个错误。之后的版本都会报这个错误。
https://github.com/vuejs/language-tools/issues/3856 this solved my problem add "jsxImportSource": "vue" in tsconfig.json !
If you don't use jsx typescript should not report this issue 🤔