HTML in `<template>` tag is picked up by VSCode as JSX Element, but it has `any` type (TypeScript error)

#6 · closed · 1 comments

View on GitHub ↗

patarapolw

> JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists. ![JSX.IntrinsicElement error](https://user-images.githubusercontent.com/21255931/162600747-99adb2f0-7c00-43f5-a0fb-f1442139d79a.png) Vite has this fix. `/src/env.d.ts` ```ts /// <reference types="vite/client" /> declare module '*.vue' { import type { DefineComponent } from 'vue' // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types const component: DefineComponent<{}, {}, any> export default component } ```

Comments

johnsoncodehk

You need to install node_modules to remove this error.