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&#60;string \| symbol, [SubscriberDescriptor](/references/services/types/SubscriberDescriptor)[]&#62;

Returns

Map<string | symbol, SubscriberDescriptor[]>

MapMap<string | symbol, SubscriberDescriptor[]>Required

Methods

emit

Abstract **emit**<TypeParameter T>(eventName, data, options): Promise&#60;void&#62;

TobjectRequired

Parameters

eventNamestringRequired
dataTRequired
optionsRecord<string, unknown>Required

Returns

Promise<void>

PromisePromise<void>Required

Abstract **emit**<TypeParameter T>(data): Promise&#60;void&#62;

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](/references/services/classes/AbstractEventBusModuleService)

Parameters

eventNamestring | symbolRequired
subscriberSubscriber<unknown>Required

Returns

AbstractEventBusModuleService

AbstractEventBusModuleServiceAbstractEventBusModuleServiceRequired

unsubscribe

**unsubscribe**(eventName, subscriber, context): [AbstractEventBusModuleService](/references/services/classes/AbstractEventBusModuleService)

Parameters

eventNamestring | symbolRequired
subscriberSubscriber<unknown>Required
contextSubscriberContextRequired

Returns

AbstractEventBusModuleService

AbstractEventBusModuleServiceAbstractEventBusModuleServiceRequired
Was this section helpful?