Skip to main content

Type Alias: EventMiddleware()<EventMap>

EventMiddleware<EventMap> = <K>(event: K, data: EventMap[K], next: () => Promise<void> | void) => Promise<void> | void

Defined in: electron/events/TypedEventBus.ts:304

Middleware function signature used by TypedEventBus to process events before they are emitted to listeners.

Type Parameters

EventMap

EventMap extends TypedEventMap = TypedEventMap

Type Parameters

K

K extends EventKey<EventMap>

Parameters

event

K

data

EventMap[K]

next

() => Promise<void> | void

Returns

Promise<void> | void