Skip to main content
Skip to main content

AbstractEventBusModuleService

admin/discounts.internal.AbstractEventBusModuleService

Implements

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

Implementation of

IEventBusModuleService.emit

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

TobjectRequired

Parameters

dataEmitData<T>[]Required

Returns

Promise<void>

PromisePromise<void>Required

Implementation of

IEventBusModuleService.emit


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

Implementation of

IEventBusModuleService.subscribe


unsubscribe

unsubscribe(eventName, subscriber, context): AbstractEventBusModuleService

Parameters

eventNamestring | symbolRequired
subscriberSubscriber<unknown>Required
contextSubscriberContextRequired

Returns

AbstractEventBusModuleService

AbstractEventBusModuleServiceAbstractEventBusModuleServiceRequired

Implementation of

IEventBusModuleService.unsubscribe

Was this section helpful?