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(
150150 )
151151 ) ;
152152 }
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+ } ) ;
160156
161157 return typeProperty ;
162158}
@@ -559,10 +555,7 @@ function createVisitor(
559555 ts . factory . createTypeReferenceNode ( dataTypeName , undefined ) ,
560556 { optional : true }
561557 ) ;
562- // @ts -ignore
563- refTypeDataProperty . questionToken = ts . factory . createToken (
564- ts . SyntaxKind . QuestionToken
565- ) ;
558+
566559 const refTypeFragmentRefProperty = objectTypeProperty (
567560 FRAGMENT_REFS ,
568561 ts . factory . createTypeReferenceNode ( FRAGMENT_REFS_TYPE_NAME , [
@@ -752,13 +745,9 @@ function makeRawResponseProp(
752745 ) ;
753746 }
754747
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+ } ) ;
762751
763752 return typeProperty ;
764753}
You can’t perform that action at this time.
0 commit comments