import { contextBridge , ipcRenderer , IpcRendererEvent , } from "electron" ; contextBridge . exposeInMainWorld ( "bridge" , { sendIpc : ipcRenderer . send , listenIpc : ( channel , callBack ) => { ipcRenderer . on ( channel , ( event , arg ) => { callBack ( event , arg ) ; } ) ; } , } ) ;