@nodeboot/starter-persistence
Version:
Nodeboot starter package for persistence. Supports data access layer auto-configuration providing features like database initialization, consistency check, entity mapping, repository pattern, transactions, paging, migrations, persistence listeners, persis
23 lines • 867 B
TypeScript
import { EntitySubscriberInterface } from "typeorm";
/**
* Decorator to mark a class as a TypeORM Entity Subscriber and register it
* within the PersistenceContext for event handling.
*
* Use this decorator on classes implementing EntitySubscriberInterface
* to automatically subscribe to entity events in the persistence layer.
*
* @template T - A class type extending EntitySubscriberInterface.
* @returns {ClassDecorator} The class decorator function.
*
* @example
* ```ts
* @EntityEventSubscriber()
* class UserSubscriber implements EntitySubscriberInterface<User> {
* // implementation...
* }
* ```
*
* @author Manuel Santos <https://github.com/manusant>
*/
export declare function EntityEventSubscriber<T extends new (...args: any[]) => EntitySubscriberInterface>(): (target: T) => void;
//# sourceMappingURL=EntityEventSubscriber.d.ts.map