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

This commit is contained in:
Julien Valverdé
2024-02-08 02:42:02 +01:00
parent ed3f8fb643
commit ae4abf6b9c

View File

@@ -1,5 +1,4 @@
import { expression } from "@thilawyn/traitify-ts" import { expression } from "@thilawyn/traitify-ts"
import { NoInfer } from "effect/Types"
import { AbstractClass } from "type-fest" import { AbstractClass } from "type-fest"
import { z } from "zod" import { z } from "zod"
import { InstantiableZodSchemaObject } from "./traits/InstantiableZodSchemaObject" import { InstantiableZodSchemaObject } from "./traits/InstantiableZodSchemaObject"
@@ -20,7 +19,7 @@ export function ZodSchemaClassOf<
{ schema, defaultValues }: { { schema, defaultValues }: {
schema: z.ZodObject<SchemaT, SchemaUnknownKeys, SchemaCatchall, Values, Values> schema: z.ZodObject<SchemaT, SchemaUnknownKeys, SchemaCatchall, Values, Values>
defaultValues: NoInfer<DefaultValues> defaultValues: DefaultValues
}, },
) { ) {
const exp = expression const exp = expression
@@ -64,7 +63,7 @@ export function ZodSchemaClass<
>( >(
props: { props: {
schema: z.ZodObject<SchemaT, SchemaUnknownKeys, SchemaCatchall, Values, Values> schema: z.ZodObject<SchemaT, SchemaUnknownKeys, SchemaCatchall, Values, Values>
defaultValues: NoInfer<DefaultValues> defaultValues: DefaultValues
}, },
) { ) {
return ZodSchemaClassOf(DefaultRoot, props) return ZodSchemaClassOf(DefaultRoot, props)