cqrs-eda
Version:
Lightweight CQRS and Event-Driven Architecture library using TypeScript decorators, handlers and typings. Perfect for scalable event-driven apps.
16 lines • 616 B
TypeScript
import { Constructor } from "../types/base";
/**
* Decorator to register a class as an Observer for a specific event.
* Multiple observers can listen to the same event.
*
* @param eventName - The name of the event to observe.
* @returns Class decorator function.
*/
export declare function Observer(eventName: string): (target: Constructor) => void;
/**
* Retrieves the entire observer registry.
*
* @returns Map where keys are event names and values are arrays of observer constructors.
*/
export declare function getObserverRegistry(): Map<string, Constructor[]>;
//# sourceMappingURL=decorators.d.ts.map