feat: 添加 TradingView 相关环境变量和初始化逻辑;重构交易视图组件
This commit is contained in:
16
types/env.d.ts
vendored
16
types/env.d.ts
vendored
@@ -1,3 +1,19 @@
|
||||
// env.d.ts
|
||||
/// <reference types="vitest" />
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
interface ViteTypeOptions {
|
||||
// 添加这行代码,你就可以将 ImportMetaEnv 的类型设为严格模式,
|
||||
// 这样就不允许有未知的键值了。
|
||||
// strictImportMetaEnv: unknown
|
||||
}
|
||||
|
||||
interface ImportMetaEnv {
|
||||
readonly VITE_API_URL: string;
|
||||
readonly VITE_TRADINGVIEW_LIBRARY_URL: string;
|
||||
readonly VITE_TRADINGVIEW_DATA_API_URL: string;
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: ImportMetaEnv;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user