///
declare namespace NodeJS {
interface ProcessEnv {
/**
* The built directory structure
*
* ```tree
* ├─┬─┬ dist
* │ │ └── index.html
* │ │
* │ ├─┬ dist-electron
* │ │ ├── main.js
* │ │ └── preload.js
* │
* ```
*/
APP_ROOT: string;
/** /dist/ or /public/ */
VITE_PUBLIC: string;
}
}
// Used in Renderer process, expose in `preload.ts`
declare interface Window {
ipcRenderer: import('electron').IpcRenderer;
/** safeStorage 安全加密 API(基于 OS 原生密钥链) */
safeStorage: {
encrypt(plaintext: string): Promise;
decrypt(encryptedBase64: string): Promise;
};
/** 应用运行时 API */
appRuntime: {
/** 登录/登出后更新窗口标题中的版控后缀 */
setWindowEdition(edition: string | null): void;
};
}