transform -> pipeSchemaToInstance
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -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,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user