import { ipcMain } from 'electron' ; class Ipc { static setupIpcMessageHandler ( onIpcMessage ) { ipcMain . on ( 'elm-electron-ipc' , ( event , payload ) => { onIpcMessage ( payload ) ; } ) ; } } export { Ipc , ElmIpc } ; type ElmIpc = Quit | GreetingDialog ; interface Quit { message : 'Quit' ; } interface GreetingDialog { message : 'GreetingDialog' ; }