nestjs-transaction
Version:
A library that extracts and provides only some of the functions of the 'typeorm-transactional' npm module that are needed to operate in the Nestjs + TypeORM environment
12 lines (11 loc) • 522 B
TypeScript
import { Type } from '@nestjs/common';
import { TransactionOptions } from '../interfaces';
type TransactionHookToken = symbol | string | Type<any>;
export interface TransactionHookOption extends Pick<TransactionOptions, 'connectionName'> {
/**
* Set execute target for onCommit hooks, target is injectable class or injected providers provide token
*/
transactionHook: TransactionHookToken;
}
export declare const TransactionalEventListeners: (symbol: TransactionHookToken) => MethodDecorator;
export {};