Dependencies upgrade
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Julien Valverdé
2024-03-08 20:11:14 +01:00
parent 4392d43211
commit b680295b6c
3 changed files with 14 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
import { ImplStaticThis, trait } from "@thilawyn/traitify-ts"
import { ImplStatic, trait } from "@thilawyn/traitify-ts"
import { Class, HasRequiredKeys } from "type-fest"
import { z } from "zod"
import { StaticMembers, parseZodSchemaEffect } from "../util"
import { parseZodSchemaEffect } from "../util"
type ParseParamsArgs = [] | [params: Partial<z.ParseParams>]
@@ -32,7 +32,7 @@ export const ZodSchemaObject = <
static readonly schema = schema
static readonly schemaWithDefaultsValues = schemaWithDefaultValues
static instantiationTransform<
static transform<
Instance extends Values,
T extends z.ZodRawShape,
@@ -53,12 +53,12 @@ export const ZodSchemaObject = <
>(
this: (
Class<Instance, [values: Values]> &
StaticMembers<ImplStaticThis<typeof ZodSchemaObject>>
ImplStatic<typeof ZodSchemaObject>
),
...[values, params]: NewZodSchemaInstanceArgs<PartialValues>
) {
return this
.instantiationTransform(this.schemaWithDefaultsValues)
.transform(this.schemaWithDefaultsValues)
.parse(values, params)
}
@@ -67,12 +67,12 @@ export const ZodSchemaObject = <
>(
this: (
Class<Instance, [values: Values]> &
StaticMembers<ImplStaticThis<typeof ZodSchemaObject>>
ImplStatic<typeof ZodSchemaObject>
),
...[values, params]: NewZodSchemaInstanceArgs<PartialValues>
) {
return this
.instantiationTransform(this.schemaWithDefaultsValues)
.transform(this.schemaWithDefaultsValues)
.parseAsync(values, params)
}
@@ -81,12 +81,12 @@ export const ZodSchemaObject = <
>(
this: (
Class<Instance, [values: Values]> &
StaticMembers<ImplStaticThis<typeof ZodSchemaObject>>
ImplStatic<typeof ZodSchemaObject>
),
...[values, params]: NewZodSchemaInstanceArgs<PartialValues>
) {
return parseZodSchemaEffect(
this.instantiationTransform(this.schemaWithDefaultsValues),
this.transform(this.schemaWithDefaultsValues),
values,
params,
)