From 6056504f00d75ec360cd943b109cb14a0bddfda2 Mon Sep 17 00:00:00 2001 From: jeffvli Date: Sat, 13 May 2023 00:40:02 -0700 Subject: [PATCH] Add ipcRenderer send function to preload --- src/main/preload/ipc.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/preload/ipc.ts b/src/main/preload/ipc.ts index 0018608a..780b8830 100644 --- a/src/main/preload/ipc.ts +++ b/src/main/preload/ipc.ts @@ -4,6 +4,11 @@ const removeAllListeners = (channel: string) => { ipcRenderer.removeAllListeners(channel); }; +const send = (channel: string, ...args: any[]) => { + ipcRenderer.send(channel, ...args); +}; + export const ipc = { removeAllListeners, + send, };