@message-queue-toolkit/core
Version:
Useful utilities, interfaces and base classes for message queue handling. Supports AMQP and SQS with a common abstraction on top currently
10 lines (9 loc) • 556 B
TypeScript
import type { CommonEventDefinition, EventTypeNames } from './eventTypes';
export declare class EventRegistry<SupportedEvents extends CommonEventDefinition[]> {
readonly supportedEvents: SupportedEvents;
readonly supportedEventTypes: Set<string>;
private readonly supportedEventMap;
constructor(supportedEvents: SupportedEvents);
getEventDefinitionByTypeName: <EventTypeName extends EventTypeNames<SupportedEvents[number]>>(eventTypeName: EventTypeName) => CommonEventDefinition;
isSupportedEvent(eventTypeName: string): boolean;
}