Open nightness opened 1 year ago
// @ts-nocheck suppresses errors
oneOfSchemas.helper.ts
import * as Yup from "yup"; declare module "yup" { interface MixedSchema { oneOfSchemas(schemas: Array<Yup.Schema<any>>): this; } } Yup.addMethod<Yup.MixedSchema>( Yup.mixed, "oneOfSchemas", function (schemas: Array<Yup.Schema<any>>) { return this.test( "one-of-schemas", "Not all items in [object Object] match one of the allowed schemas", (item) => schemas.some((schema) => schema.isValidSync(item, { strict: true, }) ) ); } );
Not applicable
No response
Not Applicable
Bug description
// @ts-nocheck suppresses errors
oneOfSchemas.helper.ts
How to reproduce
Not applicable
Expected behavior
No response
Prisma information
Not Applicable
Environment & setup
Prisma Version
Not Applicable