Files
vue3-element-admin/src/types/env.d.ts
2024-06-24 08:21:46 +08:00

41 lines
1.0 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// https://cn.vitejs.dev/guide/env-and-mode
declare module "*.vue" {
import { DefineComponent } from "vue";
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
const component: DefineComponent<{}, {}, any>;
export default component;
}
// TypeScript 类型提示都为 string https://github.com/vitejs/vite/issues/6930
interface ImportMetaEnv {
/** 应用端口 */
VITE_APP_PORT: number;
/** API 基础路径(代理前缀) */
VITE_APP_BASE_API: string;
/** API 地址 */
VITE_APP_API_URL: string;
/** 是否开启 Mock 服务 */
VITE_MOCK_DEV_SERVER: boolean;
}
interface ImportMeta {
readonly env: ImportMetaEnv;
}
/**
* 平台的名称、版本、运行所需的`node`版本、依赖、构建时间的类型提示
*/
declare const __APP_INFO__: {
pkg: {
name: string;
version: string;
engines: {
node: string;
};
dependencies: Record<string, string>;
devDependencies: Record<string, string>;
};
buildTimestamp: number;
};