diff --git a/src/typings/package.d.ts b/src/typings/package.d.ts index c0a75af1..e60a0242 100644 --- a/src/typings/package.d.ts +++ b/src/typings/package.d.ts @@ -7,3 +7,16 @@ declare namespace BMap { } declare const TMap: any; + +declare module 'virtual:icons/*' { + import type { FunctionalComponent, SVGAttributes } from 'vue'; + + const component: FunctionalComponent; + export default component; +} +declare module '~icons/*' { + import type { FunctionalComponent, SVGAttributes } from 'vue'; + + const component: FunctionalComponent; + export default component; +} diff --git a/tsconfig.json b/tsconfig.json index f06bc912..cd222d9c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,7 +17,7 @@ "~/*": ["./*"], "@/*": ["./src/*"] }, - "types": ["node", "vite/client", "unplugin-icons/types/vue", "naive-ui/volar"] + "types": ["node", "vite/client", "naive-ui/volar"] }, "exclude": ["node_modules", "dist"] }