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.

18 lines (17 loc) 687 B
import type { Transaction } from '../connections'; import type { EntityManager } from '../EntityManager'; import type { TransactionEventType } from '../enums'; import type { UnitOfWork } from '../unit-of-work'; export declare class TransactionEventBroadcaster { private readonly em; private readonly uow?; readonly context?: { topLevelTransaction?: boolean; } | undefined; private readonly eventManager; constructor(em: EntityManager, uow?: UnitOfWork | undefined, context?: { topLevelTransaction?: boolean; } | undefined); dispatchEvent(event: TransactionEventType, transaction?: Transaction): Promise<void>; isTopLevel(): boolean; }