( event: EventType, listener: (event: Electron.IpcMainEvent, args: T) => void, )
| 11 | * @param listener - Callback invoked when the event is received. |
| 12 | */ |
| 13 | export function onMainEvent<T = EventData>( |
| 14 | event: EventType, |
| 15 | listener: (event: Electron.IpcMainEvent, args: T) => void, |
| 16 | ) { |
| 17 | ipcMain.on(event, listener as Parameters<typeof ipcMain.on>[1]); |
| 18 | } |
| 19 | |
| 20 | /** |
| 21 | * Register a request/response IPC handler on the main process (ipcMain.handle). |
no outgoing calls
no test coverage detected