import type { Transaction } from '../connections' ; import type { EntityManager } from '../EntityManager' ; import type { TransactionEventType } from '../enums' ; import type { UnitOfWork } from '../unit-of-work' ; export class TransactionEventBroadcaster { private readonly eventManager = this . em . getEventManager ( ) ; constructor ( private readonly em , private readonly uow ? ) { } async dispatchEvent ( event , transaction ? ) { await this . eventManager . dispatchEvent ( event , { em : this . em , transaction , uow : this . uow } ) ; } }