Search...

IBaseBroker

export declare interface IBaseBroker<TEvents extends Record<string, any>> 
export declare interface IBaseBroker<TEvents extends Record<string, any>> 

No summary provided.

NameConstraintsOptionalDefaultDescription
TEventsRecord<string, any>NoNone

subscribe(group, events)

:

Promise<void>

Subscribes to the given events, grouping them by the given group name
NameTypeOptionalDescription
groupstringNoNone
events(keyof TEvents)[]NoNone

unsubscribe(group, events)

:

Promise<void>

Unsubscribes from the given events - it's required to pass the same group name as when subscribing for proper cleanup
NameTypeOptionalDescription
groupstringNoNone
events(keyof TEvents)[]NoNone