ZodSchemaObject fix
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Julien Valverdé
2024-03-17 13:22:31 +01:00
parent d45708dc26
commit 1a1a169719

View File

@@ -19,8 +19,9 @@ export const ZodSchemaObject = <
>( >(
schemaWithDefaults: z.ZodObject<T, "strip", Catchall, Values, PartialValues>, schemaWithDefaults: z.ZodObject<T, "strip", Catchall, Values, PartialValues>,
) => trait ) => trait
.implement(Super => class ZodSchemaObjectImpl extends Super { .implement(Super => {
static readonly schema = stripZodObjectDefaults<T, "strip", Catchall, Values, PartialValues>(schemaWithDefaults) class ZodSchemaObjectImpl extends Super {
static readonly schema = stripZodObjectDefaults(schemaWithDefaults)
static readonly schemaWithDefaults = schemaWithDefaults static readonly schemaWithDefaults = schemaWithDefaults
static transform< static transform<
@@ -82,6 +83,9 @@ export const ZodSchemaObject = <
params, params,
) )
} }
}
return ZodSchemaObjectImpl
}) })
.build() .build()