Skip to content

Commit bc31643

Browse files
committed
chore: fix build
1 parent 2bb099e commit bc31643

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/object.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ export default class ObjectSchema<
202202
fieldValue =
203203
!options.__validating || !strict
204204
? // TODO: use _cast, this is double resolving
205-
field.cast(value[prop], innerOptions)
205+
(field as ISchema<any>).cast(value[prop], innerOptions)
206206
: value[prop];
207207

208208
if (fieldValue !== undefined) {

src/util/objectTypes.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ export type ObjectShape = { [k: string]: ISchema<any> | Reference };
66

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

9-
export type TypeFromShape<S extends ObjectShape, C> = {
10-
[K in keyof S]: S[K] extends ISchema<any, C> ? S[K]['__outputType'] : unknown;
9+
export type TypeFromShape<S extends ObjectShape, _C> = {
10+
[K in keyof S]: S[K] extends ISchema<any, any>
11+
? S[K]['__outputType']
12+
: unknown;
1113
};
1214

1315
export type DefaultFromShape<Shape extends ObjectShape> = {

0 commit comments

Comments
 (0)