This repository was archived by the owner on Oct 23, 2023. It is now read-only.
This repository was archived by the owner on Oct 23, 2023. It is now read-only.
vue-tsc --noEmit show error when using Svg as component #80
Closed
Description
Vue Language Features (Volar) version v0.27.27
TypeScript Vue Plugin (Volar) version v0.27.27
I am using https://github.com/jpkleemans/vite-svg-loader to load svg file as component
import ArrowLeftIcon from '@/assets/arrow-left-icon.svg?component'
usage in template
<div class="app-action-link" @click="goBack()">
<ArrowLeftIcon class="h-4 w-4 inline-block" /> back
</div>
vue-tsc show error in <ArrowLeftIcon
JSX element type '__VLS_9' does not have any construct or call signatures.ts(2604)
(property) ArrowLeftIcon: Component<any, any, any, ComputedOptions, MethodOptions>
my tsconfig
{
"compilerOptions": {
"target": "esnext",
"useDefineForClassFields": true,
"module": "esnext",
"moduleResolution": "node",
"strict": true,
"jsx": "preserve",
"sourceMap": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"lib": ["esnext", "dom"],
"strictNullChecks": false,
"noImplicitAny": false,
"allowSyntheticDefaultImports": true,
"skipLibCheck": true,
"experimentalDecorators": true,
"importHelpers": true,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
},
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"]
}