transform -> pipeSchemaToInstance
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Julien Valverdé
2024-03-17 16:33:22 +01:00
parent 17e148d6d2
commit 63e31a159b

View File

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