This commit is contained in:
@@ -27,8 +27,8 @@ export const ZodSchemaObject = <
|
||||
schemaWithDefaultValues: z.ZodObject<SchemaWithDefaultValuesT, SchemaWithDefaultValuesUnknownKeys, SchemaWithDefaultValuesCatchall, Values, PartialValues>,
|
||||
) => trait
|
||||
.implement(Super => class ZodSchemaObject extends Super {
|
||||
static readonly schema = schema
|
||||
static readonly schemaWithDefaultsValues = schemaWithDefaultValues
|
||||
static readonly schema = schema
|
||||
static readonly schemaWithDefaultValues = schemaWithDefaultValues
|
||||
|
||||
static transform<
|
||||
Instance extends Values,
|
||||
@@ -56,7 +56,7 @@ export const ZodSchemaObject = <
|
||||
...[values, params]: CreateArgs<PartialValues>
|
||||
) {
|
||||
return this
|
||||
.transform(this.schemaWithDefaultsValues)
|
||||
.transform(this.schemaWithDefaultValues)
|
||||
.parse(values, params)
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ export const ZodSchemaObject = <
|
||||
...[values, params]: CreateArgs<PartialValues>
|
||||
) {
|
||||
return this
|
||||
.transform(this.schemaWithDefaultsValues)
|
||||
.transform(this.schemaWithDefaultValues)
|
||||
.parseAsync(values, params)
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ export const ZodSchemaObject = <
|
||||
...[values, params]: CreateArgs<PartialValues>
|
||||
) {
|
||||
return parseZodSchemaEffect(
|
||||
this.transform(this.schemaWithDefaultsValues),
|
||||
this.transform(this.schemaWithDefaultValues),
|
||||
values,
|
||||
params,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user