import { ipcRenderer } from 'electron' ; import type { IpcRendererEvent } from 'electron' ; import { injectIPC } from '../../renderer/utils/hooks' ; import type { CommasContext } from '../types' ; function on ( this , channel , listener ) { ipcRenderer . on ( channel , listener ) ; this . $ . app . onCleanup ( ( ) => { ipcRenderer . removeListener ( channel , listener ) ; } ) ; } export { on , injectIPC as inject , } ;