UNPKG

@mikro-orm/core

Version:

TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.

16 lines (15 loc) 709 B
import type { Transaction } from '../connections/Connection.js'; import type { EntityManager } from '../EntityManager.js'; import type { TransactionEventType } from '../enums.js'; /** Broadcasts transaction lifecycle events (start, commit, rollback) through the EventManager. */ export declare class TransactionEventBroadcaster { private readonly em; readonly context?: { topLevelTransaction?: boolean; } | undefined; constructor(em: EntityManager, context?: { topLevelTransaction?: boolean; } | undefined); /** Dispatches a transaction lifecycle event to the EventManager. */ dispatchEvent(event: TransactionEventType, transaction?: Transaction): Promise<void>; }