Skip to content

Commit 57c6120

Browse files
authored
fix: generate Enhanced type helper even without logical client (#2049)
1 parent 6d3d802 commit 57c6120

File tree

1 file changed

+7
-0
lines changed
  • packages/schema/src/plugins/enhancer/enhance

1 file changed

+7
-0
lines changed

packages/schema/src/plugins/enhancer/enhance/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,13 @@ ${
207207
return `import { Prisma, type PrismaClient } from '${prismaImport}';
208208
import type * as _P from '${prismaImport}';
209209
export type { PrismaClient };
210+
211+
/**
212+
* Infers the type of PrismaClient with ZenStack's enhancements.
213+
* @example
214+
* type EnhancedPrismaClient = Enhanced<typeof prisma>;
215+
*/
216+
export type Enhanced<Client> = Client;
210217
`;
211218
}
212219

0 commit comments

Comments
 (0)