import { ipcRenderer } from 'electron'; ipcRenderer.send('get-data', 'my-param');
import { ipcRenderer } from 'electron'; ipcRenderer.on('data-loaded', (event, data) => { console.log(data); });In this example, the renderer process listens for the event 'data-loaded' and receives the data from the main process as the second argument of the callback function. The typescript electron ipcRenderer package library can be installed using npm or yarn.