Skip to main content
Skip to main content

AbstractEventBusModuleService

Implements

Constructors

constructor

new AbstractEventBusModuleService()

Properties

eventToSubscribersMap_Map<string | symbol, SubscriberDescriptor[]>Required

Accessors

eventToSubscribersMap

get eventToSubscribersMap(): Map<string | symbol, SubscriberDescriptor[]>

Returns

Map<string | symbol, SubscriberDescriptor[]>

MapMap<string | symbol, SubscriberDescriptor[]>Required

Methods

emit

Abstract emit<T>(eventName, data, options): Promise<void>

TobjectRequired

Parameters

eventNamestringRequired
dataTRequired
optionsRecord<string, unknown>Required

Returns

Promise<void>

PromisePromise<void>Required

Abstract emit<T>(data): Promise<void>

TobjectRequired

Parameters

dataEmitData<T>[]Required

Returns

Promise<void>

PromisePromise<void>Required

storeSubscribers

Protected storeSubscribers(«destructured»): void

Parameters

__namedParametersobjectRequired
__namedParameters.eventstring | symbolRequired
__namedParameters.subscriberSubscriber<unknown>Required
__namedParameters.subscriberIdstringRequired

Returns

void

voidvoid

subscribe

subscribe(eventName, subscriber, context?): AbstractEventBusModuleService

Parameters

eventNamestring | symbolRequired
subscriberSubscriber<unknown>Required

Returns

AbstractEventBusModuleService

AbstractEventBusModuleServiceAbstractEventBusModuleServiceRequired

unsubscribe

unsubscribe(eventName, subscriber, context): AbstractEventBusModuleService

Parameters

eventNamestring | symbolRequired
subscriberSubscriber<unknown>Required
contextSubscriberContextRequired

Returns

AbstractEventBusModuleService

AbstractEventBusModuleServiceAbstractEventBusModuleServiceRequired
Was this section helpful?