Use a unified client
for both calling methods in main and listening to events in renderer:
import { createClient } from '@egoist/tipc/client'
// MainHandlers for calling methods defined in main process
// RendererHandlers for listening to events and invoke the handler in renderer process
export const client = createClient<{ MainHandlers, RendererHandlers }>({
on: window.ipcRenderer.on
})
client.main.someHandlerInMain(arg1, arg2)
client.renderer.someHandlerInRenderer.on(() => {
// ...
})
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too