File tree Expand file tree Collapse file tree 2 files changed +9
-12
lines changed Expand file tree Collapse file tree 2 files changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -67,16 +67,11 @@ export class ObjValue<T extends classes.ObjType<any>> extends Value<T> implement
67
67
return this . field ( t . prop ( key , type ) , data ) ;
68
68
}
69
69
70
- public set < K extends string , V extends classes . Type > (
71
- key : K ,
72
- value : Value < V > ,
73
- ) {
70
+ public set < K extends string , V extends classes . Type > ( key : K , value : Value < V > ) {
74
71
return this . add ( key , value . type , value . data ) ;
75
72
}
76
73
77
- public merge < O extends ObjValue < any > > (
78
- obj : O ,
79
- ) : ObjValue < classes . ObjType < [ ...UnObjType < T > , ...UnObjType < O [ 'type' ] > ] > > {
74
+ public merge < O extends ObjValue < any > > ( obj : O ) : ObjValue < classes . ObjType < [ ...UnObjType < T > , ...UnObjType < O [ 'type' ] > ] > > {
80
75
Object . assign ( this . data as object , obj . data ) ;
81
76
const type = this . type ;
82
77
const system = type . system ;
Original file line number Diff line number Diff line change @@ -81,11 +81,13 @@ describe('.set()', () => {
81
81
t . str . title ( 'User ID' ) . description ( 'ID of the user to retrieve' ) . getSchema ( ) ,
82
82
) ;
83
83
expect ( router . get ( 'getUser' ) . type . res . getSchema ( ) ) . toEqual (
84
- t . object ( {
85
- id : t . str ,
86
- name : t . str . title ( 'User full name' ) . min ( 1 ) . max ( 32 ) ,
87
- friends : t . fn . input ( t . str ) . out ( t . str . title ( 'Friend name' ) ) ,
88
- } ) . getSchema ( ) ,
84
+ t
85
+ . object ( {
86
+ id : t . str ,
87
+ name : t . str . title ( 'User full name' ) . min ( 1 ) . max ( 32 ) ,
88
+ friends : t . fn . input ( t . str ) . out ( t . str . title ( 'Friend name' ) ) ,
89
+ } )
90
+ . getSchema ( ) ,
89
91
) ;
90
92
expect ( router . get ( 'echo' ) . type . req . getSchema ( ) ) . toEqual ( t . any . getSchema ( ) ) ;
91
93
} ) ;
You can’t perform that action at this time.
0 commit comments