Skip to content

Commit

Permalink
fix(projects): 修复图标的TS类型
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Aug 3, 2022
1 parent ed9cd6c commit dbd6760
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions src/typings/package.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,16 @@ declare namespace BMap {
}

declare const TMap: any;

declare module 'virtual:icons/*' {
import type { FunctionalComponent, SVGAttributes } from 'vue';

const component: FunctionalComponent<SVGAttributes>;
export default component;
}
declare module '~icons/*' {
import type { FunctionalComponent, SVGAttributes } from 'vue';

const component: FunctionalComponent<SVGAttributes>;
export default component;
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
}

1 comment on commit dbd6760

@vercel
Copy link

@vercel vercel bot commented on dbd6760 Aug 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.