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 63e31a159b - Show all commits

View File

@@ -24,7 +24,7 @@ export const ZodSchemaObject = <
static readonly schema = stripZodObjectDefaults(schemaWithDefaults) static readonly schema = stripZodObjectDefaults(schemaWithDefaults)
static readonly schemaWithDefaults = schemaWithDefaults static readonly schemaWithDefaults = schemaWithDefaults
static transform< static pipeSchemaToInstance<
Instance extends Values, Instance extends Values,
TransformT extends z.ZodRawShape, TransformT extends z.ZodRawShape,
@@ -50,7 +50,7 @@ export const ZodSchemaObject = <
...[values, params]: CreateArgs<PartialValues> ...[values, params]: CreateArgs<PartialValues>
) { ) {
return this return this
.transform(this.schemaWithDefaults) .pipeSchemaToInstance(this.schemaWithDefaults)
.parse(values, params) .parse(values, params)
} }
@@ -64,7 +64,7 @@ export const ZodSchemaObject = <
...[values, params]: CreateArgs<PartialValues> ...[values, params]: CreateArgs<PartialValues>
) { ) {
return this return this
.transform(this.schemaWithDefaults) .pipeSchemaToInstance(this.schemaWithDefaults)
.parseAsync(values, params) .parseAsync(values, params)
} }
@@ -78,7 +78,7 @@ export const ZodSchemaObject = <
...[values, params]: CreateArgs<PartialValues> ...[values, params]: CreateArgs<PartialValues>
) { ) {
return parseZodSchemaEffect( return parseZodSchemaEffect(
this.transform(this.schemaWithDefaults), this.pipeSchemaToInstance(this.schemaWithDefaults),
values, values,
params, params,
) )