interface IPubSubBroker
extends
IBaseBroker<TEvents>AsyncEventEmitter<ToEventMap<TEvents>>export interface IPubSubBroker<TEvents extends Record<string, any>> extends IBaseBroker<TEvents>, AsyncEventEmitter<ToEventMap<TEvents>>
Type Parameters
Record<string, any> TEvents extends
publishT extends keyof TEvents
>(event: Tdata: TEvents[T]) : Promise<void> <
T extends keyof TEvents
event: T
data: TEvents[T]
Publishes an event
Subscribes to the given events, grouping them by the given group name
Inherited from: IBaseBroker
Unsubscribes from the given events - it's required to pass the same group name as when subscribing for proper cleanup
Inherited from: IBaseBroker