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