Fix
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Julien Valverdé
2024-03-24 02:51:25 +01:00
parent 100df15a07
commit 77a3d58933
3 changed files with 8 additions and 2 deletions

View File

@@ -8,7 +8,7 @@ import { Extend, StaticMembers } from "./util"
export function ExtendZodSchemaClass< export function ExtendZodSchemaClass<
Self extends ( Self extends (
AbstractClass< AbstractClass<
TraitInstance<ZodSchemaObjectTrait<T, Catchall, Values, PartialValues>> & Values, Values & TraitInstance<ZodSchemaObjectTrait<T, Catchall, Values, PartialValues>>,
[values: Values] [values: Values]
> & > &
TraitStaticMembers<ZodSchemaObjectTrait<T, Catchall, Values, PartialValues>> TraitStaticMembers<ZodSchemaObjectTrait<T, Catchall, Values, PartialValues>>
@@ -26,7 +26,7 @@ export function ExtendZodSchemaClass<
>( >(
class_: Self | ( class_: Self | (
AbstractClass< AbstractClass<
TraitInstance<ZodSchemaObjectTrait<T, Catchall, Values, PartialValues>> & Values, Values & TraitInstance<ZodSchemaObjectTrait<T, Catchall, Values, PartialValues>>,
[values: Values] [values: Values]
> & > &
TraitStaticMembers<ZodSchemaObjectTrait<T, Catchall, Values, PartialValues>> TraitStaticMembers<ZodSchemaObjectTrait<T, Catchall, Values, PartialValues>>

View File

@@ -85,6 +85,7 @@ export const JsonifiedZodSchemaObject = <
params?: Partial<z.ParseParams>, params?: Partial<z.ParseParams>,
) { ) {
const t = implStaticInstantiableThis(JsonifiedZodSchemaObjectImpl, this) const t = implStaticInstantiableThis(JsonifiedZodSchemaObjectImpl, this)
return t return t
.pipeSchemaIntoInstance(t.jsonifySchema) .pipeSchemaIntoInstance(t.jsonifySchema)
.parse(values, params) .parse(values, params)
@@ -98,6 +99,7 @@ export const JsonifiedZodSchemaObject = <
params?: Partial<z.ParseParams>, params?: Partial<z.ParseParams>,
) { ) {
const t = implStaticInstantiableThis(JsonifiedZodSchemaObjectImpl, this) const t = implStaticInstantiableThis(JsonifiedZodSchemaObjectImpl, this)
return t return t
.pipeSchemaIntoInstance(t.jsonifySchema) .pipeSchemaIntoInstance(t.jsonifySchema)
.parseAsync(values, params) .parseAsync(values, params)
@@ -111,6 +113,7 @@ export const JsonifiedZodSchemaObject = <
params?: Partial<z.ParseParams>, params?: Partial<z.ParseParams>,
) { ) {
const t = implStaticInstantiableThis(JsonifiedZodSchemaObjectImpl, this) const t = implStaticInstantiableThis(JsonifiedZodSchemaObjectImpl, this)
return parseZodSchemaEffect( return parseZodSchemaEffect(
t.pipeSchemaIntoInstance(t.jsonifySchema), t.pipeSchemaIntoInstance(t.jsonifySchema),
values, values,

View File

@@ -63,6 +63,7 @@ export const ZodSchemaObject = <
...[values, params]: CreateArgs<PartialValues> ...[values, params]: CreateArgs<PartialValues>
) { ) {
const t = implStaticInstantiableThis(ZodSchemaObjectImpl, this) const t = implStaticInstantiableThis(ZodSchemaObjectImpl, this)
return t return t
.pipeSchemaIntoInstance(t.schemaWithDefaults) .pipeSchemaIntoInstance(t.schemaWithDefaults)
.parse(values, params) .parse(values, params)
@@ -75,6 +76,7 @@ export const ZodSchemaObject = <
...[values, params]: CreateArgs<PartialValues> ...[values, params]: CreateArgs<PartialValues>
) { ) {
const t = implStaticInstantiableThis(ZodSchemaObjectImpl, this) const t = implStaticInstantiableThis(ZodSchemaObjectImpl, this)
return t return t
.pipeSchemaIntoInstance(t.schemaWithDefaults) .pipeSchemaIntoInstance(t.schemaWithDefaults)
.parseAsync(values, params) .parseAsync(values, params)
@@ -87,6 +89,7 @@ export const ZodSchemaObject = <
...[values, params]: CreateArgs<PartialValues> ...[values, params]: CreateArgs<PartialValues>
) { ) {
const t = implStaticInstantiableThis(ZodSchemaObjectImpl, this) const t = implStaticInstantiableThis(ZodSchemaObjectImpl, this)
return parseZodSchemaEffect( return parseZodSchemaEffect(
t.pipeSchemaIntoInstance(t.schemaWithDefaults), t.pipeSchemaIntoInstance(t.schemaWithDefaults),
values, values,