Drizzle doesn’t provide a type for transactions, so you need to extract it yourself.
types/definitions/database.ts
TypeScript
1import type { drizzle } from 'drizzle-orm/node-postgres'
2
3export type DrizzleClient = ReturnType<typeof drizzle>
4export type Transaction = Parameters<Parameters<DrizzleClient['transaction']>[0]>[0]