19 lines
507 B
TypeScript
19 lines
507 B
TypeScript
|
|
/// <reference types="vite/client" />
|
||
|
|
|
||
|
|
declare module '*.vue' {
|
||
|
|
import type { DefineComponent } from 'vue'
|
||
|
|
const component: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>
|
||
|
|
export default component
|
||
|
|
}
|
||
|
|
|
||
|
|
/** 环境变量类型声明,使 import.meta.env.VITE_* 具备补全与类型检查 */
|
||
|
|
interface ImportMetaEnv {
|
||
|
|
readonly VITE_APP_TITLE: string
|
||
|
|
readonly VITE_API_BASE_URL: string
|
||
|
|
readonly VITE_PORT?: string
|
||
|
|
}
|
||
|
|
|
||
|
|
interface ImportMeta {
|
||
|
|
readonly env: ImportMetaEnv
|
||
|
|
}
|