UNPKG

@softkit/typeorm

Version:

This library has some useful utilities for typeorm, entities, repositories, useful subscribers, interceptors.

12 lines (11 loc) 604 B
import { ClsService } from 'nestjs-cls'; import { DataSource, EntitySubscriberInterface, InsertEvent, UpdateEvent } from 'typeorm'; import { TenantClsStore } from '@softkit/persistence-api'; export declare class ClsPresetSubscriber<ClsStoreType extends TenantClsStore> implements EntitySubscriberInterface { private readonly dataSource; private readonly clsService; constructor(dataSource: DataSource, clsService: ClsService<ClsStoreType>); beforeInsert(event: InsertEvent<any>): Promise<any> | void; beforeUpdate(event: UpdateEvent<any>): any; private handleEntityChangeEvent; }