// Electron API 类型声明 interface ElectronAPI { fetchPdf: (pdfUrl: string) => Promise<{ success: boolean; data?: string; error?: string }>; printPdf: (pdfUrl: string) => Promise<{ success: boolean; error?: string }>; } interface Window { electronAPI?: ElectronAPI; }