Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-artuso committed Jan 29, 2024
1 parent dfef26a commit d3e40d5
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { TransactionalAdapter } from '@nestjs-cls/transactional';
import { IBaseProtocol } from 'pg-promise';
import { IDatabase } from 'pg-promise';

export type Database = IBaseProtocol<unknown>;
export type Database = IDatabase<unknown>;

type TxOptions = Parameters<Database['tx']>[0];

Expand All @@ -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();
});
},
Expand Down

0 comments on commit d3e40d5

Please sign in to comment.