diff --git a/packages/transactional-adapters/transactional-adapter-pg-promise/src/lib/transactional-adapter-pg-promise.ts b/packages/transactional-adapters/transactional-adapter-pg-promise/src/lib/transactional-adapter-pg-promise.ts index 6578b32a..781f702a 100644 --- a/packages/transactional-adapters/transactional-adapter-pg-promise/src/lib/transactional-adapter-pg-promise.ts +++ b/packages/transactional-adapters/transactional-adapter-pg-promise/src/lib/transactional-adapter-pg-promise.ts @@ -1,7 +1,7 @@ import { TransactionalAdapter } from '@nestjs-cls/transactional'; -import { IBaseProtocol } from 'pg-promise'; +import { IDatabase } from 'pg-promise'; -export type Database = IBaseProtocol; +export type Database = IDatabase; type TxOptions = Parameters[0]; @@ -28,7 +28,7 @@ export class TransactionalAdapterPgPromise setClient: (client?: Database) => void, ) => { return pgPromiseDbInstance.tx(options ?? {}, (tx) => { - setClient(tx); + setClient(tx as unknown as Database); return fn(); }); },