14 lines
286 B
TypeScript
14 lines
286 B
TypeScript
import { ipcRenderer } from 'electron';
|
|
|
|
const removeAllListeners = (channel: string) => {
|
|
ipcRenderer.removeAllListeners(channel);
|
|
};
|
|
|
|
const send = (channel: string, ...args: any[]) => {
|
|
ipcRenderer.send(channel, ...args);
|
|
};
|
|
|
|
export const ipc = {
|
|
removeAllListeners,
|
|
send,
|
|
};
|