Kaizen
Browse modulesBookingsbookings/serverTypes

Type Alias: Tx<TClient>

type Tx<TClient> = Omit<TClient, "$connect" | "$disconnect" | "$on" | "$transaction" | "$use" | "$extends">;

Defined in: server/persistence/transaction-manager.ts:53

The subset of a Prisma client usable inside a $transaction callback — the generated client with its top-level session methods stripped. Repository code that lives inside a transaction should type its client handle as this.

Consumers parameterize with their generated PrismaClient:

import type { PrismaClient } from "@prisma/client";
type MyTx = Tx<PrismaClient>;

Type Parameters

Type Parameter
TClient

On this page