diff --git a/electron/preload/index.ts b/electron/preload/index.ts index 396b771a..53b585fa 100644 --- a/electron/preload/index.ts +++ b/electron/preload/index.ts @@ -4,19 +4,19 @@ import { ipcRenderer, contextBridge } from 'electron' contextBridge.exposeInMainWorld('ipcRenderer', { on(...args: Parameters) { const [channel, listener] = args - ipcRenderer.on(channel, (event, ...args) => listener(event, ...args)) + return ipcRenderer.on(channel, (event, ...args) => listener(event, ...args)) }, off(...args: Parameters) { const [channel, ...omit] = args - ipcRenderer.off(channel, ...omit) + return ipcRenderer.off(channel, ...omit) }, send(...args: Parameters) { const [channel, ...omit] = args - ipcRenderer.send(channel, ...omit) + return ipcRenderer.send(channel, ...omit) }, invoke(...args: Parameters) { const [channel, ...omit] = args - ipcRenderer.invoke(channel, ...omit) + return ipcRenderer.invoke(channel, ...omit) }, // You can expose other APTs you need here.