CSAPP/src/types/electron.d.ts

13 lines
398 B
TypeScript
Raw Normal View History

2025-04-29 18:36:29 +08:00
export interface ElectronAPI {
checkUrlAvailable: (url: string) => Promise<{ ok: boolean; status: number; error?: string }>;
setSessionStorage: (key: string, value: string) => void;
getSessionStorage: (key: string) => string | null;
removeSessionStorage: (key: string) => void;
clearSessionStorage: () => void;
2025-04-29 18:36:29 +08:00
}
declare global {
interface Window {
electronAPI: ElectronAPI;
}
}