refactor: ♻️ vue 文件类型声明位置调整

This commit is contained in:
ray
2024-11-12 00:21:53 +08:00
parent 43ac2a823c
commit e597853e5b
2 changed files with 5 additions and 6 deletions

6
src/types/env.d.ts vendored
View File

@@ -1,11 +1,5 @@
// https://cn.vitejs.dev/guide/env-and-mode // https://cn.vitejs.dev/guide/env-and-mode
declare module "*.vue" {
import type { DefineComponent } from "vue";
const component: DefineComponent<object, object, any>;
export default component;
}
// TypeScript 类型提示都为 string https://github.com/vitejs/vite/issues/6930 // TypeScript 类型提示都为 string https://github.com/vitejs/vite/issues/6930
interface ImportMetaEnv { interface ImportMetaEnv {
/** 应用端口 */ /** 应用端口 */

5
src/types/shims-vue.d.ts vendored Normal file
View File

@@ -0,0 +1,5 @@
declare module "*.vue" {
import type { DefineComponent } from "vue";
const component: DefineComponent<{}, {}, any>;
export default component;
}