0.1.2 #3

Merged
Thilawyn merged 136 commits from next into master 2024-03-11 19:44:21 +01:00
2 changed files with 4 additions and 7 deletions
Showing only changes of commit aefca6657b - Show all commits

View File

@@ -56,7 +56,7 @@ extends TraitExpressionBuilder<Superclass, Traits> {
StaticMembers<Super>
),
[...this.expressionTraits, ZodSchemaObject(schema, schemaWithDefaultValues)],
[...this.expressionTraits, ZodSchemaObject(schema, schemaWithDefaultValues(schema))],
)
}

View File

@@ -25,15 +25,12 @@ export const ZodSchemaObject = <
Values extends object,
PartialValues extends Partial<Values>,
>(
schema: z.ZodObject<SchemaT, SchemaUnknownKeys, SchemaCatchall, Values, Values>,
schemaWithDefaultValues: (
schema: z.ZodObject<SchemaT, SchemaUnknownKeys, SchemaCatchall, Values, Values>
) => z.ZodObject<SchemaWithDefaultValuesT, SchemaWithDefaultValuesUnknownKeys, SchemaWithDefaultValuesCatchall, Values, PartialValues>,
schema: z.ZodObject<SchemaT, SchemaUnknownKeys, SchemaCatchall, Values, Values>,
schemaWithDefaultValues: z.ZodObject<SchemaWithDefaultValuesT, SchemaWithDefaultValuesUnknownKeys, SchemaWithDefaultValuesCatchall, Values, PartialValues>,
) => trait
.implement(Super => class ZodSchemaObject extends Super {
static readonly schema = schema
static readonly schemaWithDefaultsValues = schemaWithDefaultValues(schema)
static readonly schemaWithDefaultsValues = schemaWithDefaultValues
static instantiationTransform<
Instance extends Values,