jest-prisma icon indicating copy to clipboard operation
jest-prisma copied to clipboard

[Error] Can not transpile , type definition error for PrismaClient at delegate.d.ts

Open Gnagano opened this issue 2 years ago • 2 comments

When I try to use this library, I got transplile error at delegate.d.ts.

This seems to be wrong type definition

getClient(): PrismaClient<Prisma.PrismaClientOptions, never, Prisma.RejectOnNotFound | Prisma.RejectPerOperation | undefined, {
        result: {};
        model: {};
        query: {};
        client: {};
    }> | undefined;

Error Message

Generic type 'PrismaClient<T, U, GlobalReject>' requires between 0 and 3 type arguments.

As you can see, the definition has one more extra arguments...

Do I have any options to remove error?

Gnagano avatar Dec 12 '22 17:12 Gnagano

To work around this, setskipLibCheck true in your tsconfig.json .

Quramy avatar Dec 14 '22 15:12 Quramy

Thank you for your advice. I'll do it.

Gnagano avatar Dec 15 '22 01:12 Gnagano