File tree Expand file tree Collapse file tree 1 file changed +7
-18
lines changed Expand file tree Collapse file tree 1 file changed +7
-18
lines changed Original file line number Diff line number Diff line change @@ -150,13 +150,9 @@ function makeProp(
150
150
)
151
151
) ;
152
152
}
153
- const typeProperty = objectTypeProperty ( key , value ) ;
154
- if ( conditional ) {
155
- // @ts -ignore
156
- typeProperty . questionToken = ts . factory . createToken (
157
- ts . SyntaxKind . QuestionToken
158
- ) ;
159
- }
153
+ const typeProperty = objectTypeProperty ( key , value , {
154
+ optional : conditional ,
155
+ } ) ;
160
156
161
157
return typeProperty ;
162
158
}
@@ -559,10 +555,7 @@ function createVisitor(
559
555
ts . factory . createTypeReferenceNode ( dataTypeName , undefined ) ,
560
556
{ optional : true }
561
557
) ;
562
- // @ts -ignore
563
- refTypeDataProperty . questionToken = ts . factory . createToken (
564
- ts . SyntaxKind . QuestionToken
565
- ) ;
558
+
566
559
const refTypeFragmentRefProperty = objectTypeProperty (
567
560
FRAGMENT_REFS ,
568
561
ts . factory . createTypeReferenceNode ( FRAGMENT_REFS_TYPE_NAME , [
@@ -752,13 +745,9 @@ function makeRawResponseProp(
752
745
) ;
753
746
}
754
747
755
- const typeProperty = objectTypeProperty ( key , value ) ;
756
- if ( conditional ) {
757
- // @ts -ignore
758
- typeProperty . questionToken = ts . factory . createToken (
759
- ts . SyntaxKind . QuestionToken
760
- ) ;
761
- }
748
+ const typeProperty = objectTypeProperty ( key , value , {
749
+ optional : conditional ,
750
+ } ) ;
762
751
763
752
return typeProperty ;
764
753
}
You can’t perform that action at this time.
0 commit comments