Skip to content

electron-reactive-event / API / Main / getMainIpc

getMainIpc() Function

ts
function getMainIpc<MainRegistrar, RendererRegistrar>(): FactoryReturnType<
	MainRegistrar,
	RendererRegistrar
>;

Get the IPC functions for sending and receiving events to/from the renderer. The returned functions are typed to your registrar interfaces.

Type Parameters

MainRegistrar

MainRegistrar extends IMainRegistrarBase

The event registrar for your main events.

RendererRegistrar

RendererRegistrar extends IRendererRegistrarBase

The event registrar for your renderer events.

Returns

FactoryReturnType<MainRegistrar, RendererRegistrar>

The IPC functions typed to your event registrars.

See

FactoryReturnType for the function types returned by this function.