Type alias MediatorMiddlewareConfig<Context, EventName>

MediatorMiddlewareConfig<Context, EventName>: {
    event: EventName | WildcardEvent;
    handler: MediatorMiddleware<Context, EventName>;
}

Represents a middleware configuration option. Defines which events a middleware should handle and the handler function.

Type Parameters

  • Context extends MediatorContext

    The type of the MediatorContext.

  • EventName extends string = string

    The type of the event names.

Type declaration