1
0
mirror of https://github.com/rhysd/Mstdn.git synced 2024-11-30 22:24:13 +01:00
Mstdn/renderer/ipc.ts
2017-04-16 12:44:53 +09:00

12 lines
333 B
TypeScript

import log from './log';
import r from './require';
const electron = r('electron');
const ipc = electron.ipcRenderer;
export function on(channel: IpcChannel, callback: (...args: any[]) => void) {
ipc.on(channel, (...args: any[]) => {
log.debug('IPC: Received from:', channel, args);
callback(...args);
});
}