admin/vite-env.d.ts

29 lines
628 B
TypeScript

// 如果使用 Vite 4+ 推荐官方类型
interface ImportMeta {
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
}
interface ImportMeta {
readonly env: ImportMetaEnv
}
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
}