0.1.3 #4

Merged
Thilawyn merged 74 commits from next into master 2024-03-24 22:24:25 +01:00
Showing only changes of commit af00628434 - Show all commits

View File

@@ -27,14 +27,14 @@ export const ZodSchemaObject = <
static pipeSchemaToInstance<
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))
}