From bc3164373140658423fd5bb4849c9506abacc109 Mon Sep 17 00:00:00 2001 From: Jason Quense Date: Fri, 19 Aug 2022 14:04:16 -0400 Subject: [PATCH] chore: fix build --- src/object.ts | 2 +- src/util/objectTypes.ts | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/object.ts b/src/object.ts index 55204dd51..6429e2082 100644 --- a/src/object.ts +++ b/src/object.ts @@ -202,7 +202,7 @@ export default class ObjectSchema< fieldValue = !options.__validating || !strict ? // TODO: use _cast, this is double resolving - field.cast(value[prop], innerOptions) + (field as ISchema).cast(value[prop], innerOptions) : value[prop]; if (fieldValue !== undefined) { diff --git a/src/util/objectTypes.ts b/src/util/objectTypes.ts index 7943cf3b1..b1b9c53e4 100644 --- a/src/util/objectTypes.ts +++ b/src/util/objectTypes.ts @@ -6,8 +6,10 @@ export type ObjectShape = { [k: string]: ISchema | Reference }; export type AnyObject = { [k: string]: any }; -export type TypeFromShape = { - [K in keyof S]: S[K] extends ISchema ? S[K]['__outputType'] : unknown; +export type TypeFromShape = { + [K in keyof S]: S[K] extends ISchema + ? S[K]['__outputType'] + : unknown; }; export type DefaultFromShape = {