pilfer
pilfer
PPrisma
Created by pilfer on 1/7/2025 in #help-and-questions
The "omit" field type is not generated for Prisma client - v6.2.0
While attempting to play with the new omit exclusion feature (here: https://www.prisma.io/docs/orm/prisma-client/queries/excluding-fields#excluding-a-field-globally-using-omit), I found what may be a generator bug. I'm seeing the typescript error of, Object literal may only specify known properties, and 'omit' does not exist in type 'Subset<PrismaClientOptions, PrismaClientOptions>' when attempting to use new PrismaClient({ omit: { user: password } }). I'm using prisma version 6.2.0 and I have already regenerated the client multiple times. The generated node_modules/.prisma/client/index.d.ts file doesn't included the omit field, despite it existing here: https://github.com/prisma/prisma/blob/6.2.0/packages/client/src/runtime/getPrismaClient.ts#L134C2-L134C27 It does generate if I use the previewFeatures = ["omitApi"] feature flag, but npx prisma generate throws a warning of Preview feature "omitApi" is deprecated. The functionality can be used without specifying it as a preview feature.. Am I doing something wrong, or is this just a bug?
24 replies