Open Darkbound opened 4 months ago
Describe the bug I am trying to do inline validation with rich comments and zod, most of it works fine, but the omitting yields TS errors
generator client { provider = "prisma-client-js" } generator zod { provider = "zod-prisma-types" output = "../schemas/" useMultipleFiles = true } datasource db { provider = "postgresql" url = env("POSTGRES_PRISMA_URL") // uses connection pooling directUrl = env("POSTGRES_URL_NON_POOLING") // uses a direct connection } model TimeEntry { /// @zod.custom.omit([input]) id String @id @default(cuid()) name String }
For example here, just by trying to omit the id field for the inputs, I get 30 TS errors.
id
It works, zod does omit the field, but I cant pass TS checks.
Screenshots
Package versions (please complete the following information):
Additional context Add any other context about the problem here.
Describe the bug I am trying to do inline validation with rich comments and zod, most of it works fine, but the omitting yields TS errors
For example here, just by trying to omit the
id
field for the inputs, I get 30 TS errors.It works, zod does omit the field, but I cant pass TS checks.
Screenshots
Package versions (please complete the following information):
Additional context Add any other context about the problem here.