import type { PropType as VuePropType, VNodeChild } from 'vue'; import type { AppRouteRecordRaw } from './router'; declare global { // define global const __VITE_USE_MOCK__: boolean; const __APP_INFO__: { pkg: { name: string; version: string; dependencies: Recordable; devDependencies: Recordable; }; lastBuildTime: string; }; // router type RouteRecordItem = AppRouteRecordRaw; // vue type PropType = VuePropType; type VueNode = VNodeChild | JSX.Element; // utils type AnyFunction = (...args: any[]) => T; type PartialReturnType unknown> = Partial>; type Nullable = T | null; type Recordable = Record; type TimeoutHandle = ReturnType; type IntervalHandle = ReturnType; type DeepPartial = { [P in keyof T]?: DeepPartial; }; interface Fn { (...arg: T[]): R; } interface PromiseFn { (...arg: T[]): Promise; } type RefType = T | null; type LabelValueOptions = { label: string; value: any; [key: string]: string | number | boolean; }[]; type EmitType = (event: string, ...args: any[]) => void; type TargetContext = '_self' | '_blank'; interface ComponentElRef { $el: T; } type ComponentRef = ComponentElRef | null; type ElRef = Nullable; // import.meta interface ImportMetaEnv extends ViteEnv { __: never; } interface ViteEnv { VITE_USE_MOCK: boolean; VITE_PUBLIC_PATH: string; VITE_GLOB_APP_TITLE: string; VITE_DROP_CONSOLE: boolean; VITE_USE_HTTPS: boolean; VITE_BUILD_COMPRESS: 'gzip' | 'brotli' | 'none'; } }