Files
xian_vue_new/env.d.ts
T

62 lines
1.2 KiB
TypeScript
Raw Normal View History

2026-04-07 21:22:31 +08:00
/// <reference types="vite/client" />
declare module '*.vue' {
2026-04-21 15:49:56 +08:00
import type { DefineComponent } from 'vue';
2026-05-12 17:45:43 +08:00
const component: DefineComponent<object, object, unknown>;
2026-04-21 15:49:56 +08:00
export default component;
2026-04-07 21:22:31 +08:00
}
// 声明环境变量类型
interface ImportMetaEnv {
2026-04-21 15:49:56 +08:00
readonly VITE_BACKEND_BASE_URL: string;
readonly START_PORT: number;
readonly VITE_GEOSERVER_BASE_URL: string;
2026-05-12 17:45:43 +08:00
readonly VITE_WEBSOCKET_URL: string;
2026-04-21 15:49:56 +08:00
readonly MODE: string;
readonly DEV: boolean;
readonly PROD: boolean;
readonly SSR: boolean;
2026-04-07 21:22:31 +08:00
}
interface ImportMeta {
2026-04-21 15:49:56 +08:00
readonly env: ImportMetaEnv;
readonly glob;
2026-04-07 21:22:31 +08:00
}
// 声明 CSS 模块类型
declare module '*.css' {
2026-04-21 15:49:56 +08:00
const content: Record<string, string>;
export default content;
2026-04-07 21:22:31 +08:00
}
// 声明静态资源类型
declare module '*.svg' {
2026-04-21 15:49:56 +08:00
const content: string;
export default content;
2026-04-07 21:22:31 +08:00
}
declare module '*.png' {
2026-04-21 15:49:56 +08:00
const content: string;
export default content;
2026-04-07 21:22:31 +08:00
}
declare module '*.jpg' {
2026-04-21 15:49:56 +08:00
const content: string;
export default content;
2026-04-07 21:22:31 +08:00
}
declare module '*.jpeg' {
2026-04-21 15:49:56 +08:00
const content: string;
export default content;
2026-04-07 21:22:31 +08:00
}
declare module '*.gif' {
2026-04-21 15:49:56 +08:00
const content: string;
export default content;
2026-04-07 21:22:31 +08:00
}
declare module '*.webp' {
2026-04-21 15:49:56 +08:00
const content: string;
export default content;
2026-04-07 21:22:31 +08:00
}