Cross-extension typing
Hi,
I'm creating several extensions for my prisma client, each in a dedicated file, using
One of those extension uses a function defined in another extension. It works, but typescript put me a warning because it doesn't detect the function in the extension, because it uses the client default types, and not the extended ones. Do you know if there is a way to extends the prisma type, maybe just inside the extension file that needs that with the return type of my other defineExtension ?
I'm creating several extensions for my prisma client, each in a dedicated file, using
Prisma.defineExtension(), and then includes its in my client with new PrismaClient().$extends(firstExtension).$extends(secondExtension)...One of those extension uses a function defined in another extension. It works, but typescript put me a warning because it doesn't detect the function in the extension, because it uses the client default types, and not the extended ones. Do you know if there is a way to extends the prisma type, maybe just inside the extension file that needs that with the return type of my other defineExtension ?