Commit bc31643 1 parent 2bb099e commit bc31643 Copy full SHA for bc31643
File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ export default class ObjectSchema<
202
202
fieldValue =
203
203
! options . __validating || ! strict
204
204
? // TODO: use _cast, this is double resolving
205
- field . cast ( value [ prop ] , innerOptions )
205
+ ( field as ISchema < any > ) . cast ( value [ prop ] , innerOptions )
206
206
: value [ prop ] ;
207
207
208
208
if ( fieldValue !== undefined ) {
Original file line number Diff line number Diff line change @@ -6,8 +6,10 @@ export type ObjectShape = { [k: string]: ISchema<any> | Reference };
6
6
7
7
export type AnyObject = { [ k : string ] : any } ;
8
8
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 ;
11
13
} ;
12
14
13
15
export type DefaultFromShape < Shape extends ObjectShape > = {
You can’t perform that action at this time.
0 commit comments