types: add ImportMetaEnv

This commit is contained in:
陈凯龙
2022-03-01 14:37:15 +08:00
parent 563787c296
commit 38e0257487
9 changed files with 55 additions and 37 deletions

12
types/env.d.ts vendored
View File

@@ -7,8 +7,18 @@ declare module '*.vue' {
export default component
}
interface ImportMetaEnv {
readonly VITE_APP_TITLE: string
readonly VITE_API_BASEPATH: string
readonly VITE_BASE_PATH: string
readonly VITE_DROP_DEBUGGER: string
readonly VITE_DROP_CONSOLE: string
readonly VITE_SOURCEMAP: string
readonly VITE_OUT_DIR: string
}
declare global {
interface ImportMeta {
env: Record<string, unknown>
readonly env: ImportMetaEnv
}
}