This commit is contained in:
@@ -25,16 +25,16 @@ export const ZodSchemaObject = <
|
||||
static readonly schemaWithDefaults = schemaWithDefaults
|
||||
|
||||
static pipeSchemaToInstance<
|
||||
Instance extends Values,
|
||||
Instance extends Values,
|
||||
|
||||
TransformT extends z.ZodRawShape,
|
||||
TransformUnknownKeys extends z.UnknownKeysParam,
|
||||
TransformCatchall extends z.ZodTypeAny,
|
||||
TransformOutput extends Values,
|
||||
TransformInput,
|
||||
SchemaT extends z.ZodRawShape,
|
||||
SchemaUnknownKeys extends z.UnknownKeysParam,
|
||||
SchemaCatchall extends z.ZodTypeAny,
|
||||
SchemaOutput extends Values,
|
||||
SchemaInput,
|
||||
>(
|
||||
this: Class<Instance, [values: Values]>,
|
||||
schema: z.ZodObject<TransformT, TransformUnknownKeys, TransformCatchall, TransformOutput, TransformInput>,
|
||||
schema: z.ZodObject<SchemaT, SchemaUnknownKeys, SchemaCatchall, SchemaOutput, SchemaInput>,
|
||||
) {
|
||||
return schema.transform(values => new this(values))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user