0.1.3 #4

Merged
Thilawyn merged 74 commits from next into master 2024-03-24 22:24:25 +01:00
Showing only changes of commit c3c7c0aba5 - Show all commits

View File

@@ -13,18 +13,15 @@ type CreateArgs<Input extends object> = (
export const ZodSchemaObject = <
SchemaT extends z.ZodRawShape,
SchemaUnknownKeys extends z.UnknownKeysParam,
SchemaCatchall extends z.ZodTypeAny,
SchemaWithDefaultValuesT extends z.ZodRawShape,
SchemaWithDefaultValuesUnknownKeys extends z.UnknownKeysParam,
SchemaWithDefaultValuesCatchall extends z.ZodTypeAny,
Values extends object,
PartialValues extends Partial<Values>,
>(
schema: z.ZodObject<SchemaT, SchemaUnknownKeys, SchemaCatchall, Values, Values>,
schemaWithDefaultValues: z.ZodObject<SchemaWithDefaultValuesT, SchemaWithDefaultValuesUnknownKeys, SchemaWithDefaultValuesCatchall, Values, PartialValues>,
schema: z.ZodObject<SchemaT, "strip", SchemaCatchall, Values, Values>,
schemaWithDefaultValues: z.ZodObject<SchemaWithDefaultValuesT, "strip", SchemaWithDefaultValuesCatchall, Values, PartialValues>,
) => trait
.implement(Super => class ZodSchemaObject extends Super {
static readonly schema = schema
@@ -95,11 +92,8 @@ export const ZodSchemaObject = <
export type ZodSchemaObjectTrait<
SchemaT extends z.ZodRawShape,
SchemaUnknownKeys extends z.UnknownKeysParam,
SchemaCatchall extends z.ZodTypeAny,
SchemaWithDefaultValuesT extends z.ZodRawShape,
SchemaWithDefaultValuesUnknownKeys extends z.UnknownKeysParam,
SchemaWithDefaultValuesCatchall extends z.ZodTypeAny,
Values extends object,
@@ -108,11 +102,8 @@ export type ZodSchemaObjectTrait<
ReturnType<
typeof ZodSchemaObject<
SchemaT,
SchemaUnknownKeys,
SchemaCatchall,
SchemaWithDefaultValuesT,
SchemaWithDefaultValuesUnknownKeys,
SchemaWithDefaultValuesCatchall,
Values,