Kaizen
Browse modulesPersistenceFunctions

Function: resolvePrismaClient()

function resolvePrismaClient<T>(): T;

Defined in: server/persistence/client-registry.ts:106

Retrieve the ambient Prisma client. Throws if nothing has been registered.

The type parameter lets the caller declare what shape they expect — taproot features pass their internal PrismaClient type; consumers pass their own. Both are the same instance at runtime, safe to coerce either way because their generated types share the taproot schema.

Type Parameters

Type Parameter
T

Returns

T

Throws

if registerPrismaClient (or initPrismaClient) was never called.

On this page