| 12 | |
| 13 | declare global { |
| 14 | interface Window { |
| 15 | platform: "mac" | "windows", |
| 16 | ipcRenderer: { |
| 17 | invoke: (channel: string, ...args: any[]) => Promise<any> |
| 18 | send: (channel: string, ...args: any[]) => void |
| 19 | on: (channel: string, listener: (...args: any[]) => void) => any |
| 20 | removeListener: (channel: string, listener: (...args: any[]) => void) => void |
| 21 | }, |
| 22 | app: { |
| 23 | getPath: (location: SystemPath) => Promise<string> |
| 24 | }, |
| 25 | webUtils: { |
| 26 | getPathForFile: (file: File) => string |
| 27 | }, |
| 28 | path: { |
| 29 | basename: (filepath: string, suffix?: string) => Promise<string> |
| 30 | extname: (filepath: string) => Promise<string> |
| 31 | } |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | contextBridge.exposeInMainWorld("ipcRenderer", { |
nothing calls this directly
no outgoing calls
no test coverage detected