user/vite-env.d.ts

44 lines
1.0 KiB
TypeScript

// 如果使用 Vite 4+ 推荐官方类型
interface ImportMeta {
readonly env: ImportMetaEnv
readonly glob: (
pattern: string,
options?: { eager?: boolean; import?: string, query?: string }
) => Record<string, any>
}
interface ImportMetaEnv {
readonly VITE_API_BASE: string
readonly VITE_APP_TITLE: string
readonly VITE_WS_URL: string,
readonly VITE_APP_ENV: string
}
interface Document {
webkitIsFullScreen: boolean;
webkitFullscreenElement: Element | null;
mozFullScreen: boolean;
msFullscreenElement: Element | null;
msExitFullscreen: () => void;
mozCancelFullScreen: () => void;
webkitExitFullscreen: () => void;
}
declare module '*.vue' {
import type { DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
}
declare module '@/*' {
import { DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
}
declare module '@assets/*' {
import { DefineComponent } from 'vue'
const component: DefineComponent<{}, {}, any>
export default component
}