0.1.2 #3

Merged
Thilawyn merged 136 commits from next into master 2024-03-11 19:44:21 +01:00
Showing only changes of commit ae4abf6b9c - Show all commits

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)