feishin/src/main/preload/ipc.ts

15 lines
286 B
TypeScript
Raw Normal View History

2022-12-19 15:59:14 -08:00
import { ipcRenderer } from 'electron';
const removeAllListeners = (channel: string) => {
ipcRenderer.removeAllListeners(channel);
};
const send = (channel: string, ...args: any[]) => {
ipcRenderer.send(channel, ...args);
};
2022-12-19 15:59:14 -08:00
export const ipc = {
removeAllListeners,
send,
2022-12-19 15:59:14 -08:00
};