UNPKG

nest-transact

Version:

This package give you a simplest possibility to use transactions with Nestjs

17 lines (16 loc) 543 B
import 'reflect-metadata'; import { EntityManager } from 'typeorm'; import { ModuleRef } from '@nestjs/core'; declare type ClassType<T = any> = new (...args: any[]) => T; export interface WithTransactionOptions { excluded?: ClassType[]; } export declare class TransactionFor<T = any> { private moduleRef; private cache; constructor(moduleRef: ModuleRef); withTransaction(manager: EntityManager, transactionOptions?: WithTransactionOptions): this; private getArgument; private findArgumentsForProvider; } export {};