Skip to content

Commit

Permalink
chore: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
jquense committed Aug 19, 2022
1 parent 2bb099e commit bc31643
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<any>).cast(value[prop], innerOptions)
: value[prop];

if (fieldValue !== undefined) {
Expand Down
6 changes: 4 additions & 2 deletions src/util/objectTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ export type ObjectShape = { [k: string]: ISchema<any> | Reference };

export type AnyObject = { [k: string]: any };

export type TypeFromShape<S extends ObjectShape, C> = {
[K in keyof S]: S[K] extends ISchema<any, C> ? S[K]['__outputType'] : unknown;
export type TypeFromShape<S extends ObjectShape, _C> = {
[K in keyof S]: S[K] extends ISchema<any, any>
? S[K]['__outputType']
: unknown;
};

export type DefaultFromShape<Shape extends ObjectShape> = {
Expand Down

0 comments on commit bc31643

Please sign in to comment.