The "omit" field type is not generated for Prisma client - v6.2.0
While attempting to play with the new
I'm seeing the typescript error of,
I'm using prisma version 6.2.0 and I have already regenerated the client multiple times.
The generated
It does generate if I use the
Am I doing something wrong, or is this just a bug?
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-L134C27It 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?
This page explains how to exclude sensitive fields from Prisma Client

GitHub
Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB - prisma/prisma