Skip to content

electron-reactive-event / API / Event / Response

Response Type

ts
type Response<ChannelType, Registrar> =
	ResponseDeclKey extends keyof Registrar[ChannelType]
		? Registrar[ChannelType][ResponseDeclKey]
		: never;

This is the type that the developer will return in their callbacks. It varies from the type that is sent via IPC.

Type Parameters

ChannelType

ChannelType extends Channel<Registrar>

The desired channel of the given Registrar.

Registrar

Registrar extends IRegistrarBase

The registrar interface that holds the desired event declaration.