@@ -51,14 +51,14 @@ export class ObjKeyOptType<K extends string, V extends Type> extends ObjKeyType<
5151 }
5252}
5353
54- export class ObjType < F extends ObjKeyType < any , any > [ ] = ObjKeyType < any , any > [ ] > extends AbsType <
54+ export class ObjType < F extends ( ObjKeyType < any , any > | ObjKeyOptType < any , any > ) [ ] = ( ObjKeyType < any , any > | ObjKeyOptType < any , any > ) [ ] > extends AbsType <
5555 schema . ObjSchema < SchemaOfObjectFields < F > >
5656> {
5757 constructor ( public readonly keys : F ) {
5858 super ( schema . s . obj as any ) ;
5959 }
6060
61- private _key ( field : ObjKeyType < any , any > , options ?: schema . Optional < schema . KeySchema < any , any > > ) : void {
61+ private _key ( field : ObjKeyType < any , any > | ObjKeyOptType < any , any > , options ?: schema . Optional < schema . KeySchema < any , any > > ) : void {
6262 if ( options ) field . options ( options ) ;
6363 field . system = this . system ;
6464 this . keys . push ( field as any ) ;
@@ -94,7 +94,7 @@ export class ObjType<F extends ObjKeyType<any, any>[] = ObjKeyType<any, any>[]>
9494 ) : ObjType < [ ...F , ObjKeyOptType < K , V > ] > {
9595 this . _key ( new ObjKeyOptType < K , V > ( key , value ) , options ) ;
9696 return < any > this ;
97- }
97+ } d
9898
9999 public getSchema ( ) : schema . ObjSchema < SchemaOfObjectFields < F > > {
100100 return {
0 commit comments