feat(projects): 重构项目的TS类型架构,去除interface文件夹

This commit is contained in:
Soybean
2022-03-12 17:45:37 +08:00
parent 75de2b0604
commit 8191490f39
58 changed files with 400 additions and 461 deletions

29
src/typings/env.d.ts vendored Normal file
View File

@@ -0,0 +1,29 @@
/// <reference types="vite/client" />
declare module '*.vue' {
import { DefineComponent } from 'vue';
const component: DefineComponent<object, object, any>;
export default component;
}
interface ImportMetaEnv {
/** 项目基本地址 */
readonly VITE_BASE_URL: string;
/** 项目名称 */
readonly VITE_APP_NAME: string;
/** 项目标题 */
readonly VITE_APP_TITLE: string;
/** 项目描述 */
readonly VITE_APP_DESC: string;
/** 是否开启打包文件大小结果分析 */
readonly VITE_VISUALIZER: 'true' | 'false';
/** 网路请求环境类型 */
readonly VITE_HTTP_ENV?: Service.HttpEnv;
/** hash路由模式 */
readonly VITE_HASH_ROUTE?: 'true' | 'false';
}
interface ImportMeta {
readonly env: ImportMetaEnv;
}