@@ -96,27 +96,43 @@ if (data != null) {
96
96
const typedData : ResponseData = data ;
97
97
}
98
98
99
- declare function runQueryA ( q : TypedQueryDocumentNode < { output : string } , { input : string | null } > ) : void ;
99
+ declare function runQueryA (
100
+ q : TypedQueryDocumentNode < { output : string } , { input : string | null } > ,
101
+ ) : void ;
100
102
101
103
// valid
102
- declare const optionalInputRequiredOutput : TypedQueryDocumentNode < { output : string } , { input : string | null } > ;
104
+ declare const optionalInputRequiredOutput : TypedQueryDocumentNode <
105
+ { output : string } ,
106
+ { input : string | null }
107
+ > ;
103
108
runQueryA ( optionalInputRequiredOutput ) ;
104
109
105
- declare function runQueryB ( q : TypedQueryDocumentNode < { output : string | null } , { input : string } > ) : void ;
110
+ declare function runQueryB (
111
+ q : TypedQueryDocumentNode < { output : string | null } , { input : string } > ,
112
+ ) : void ;
106
113
107
114
// still valid: We still accept {output: string} as a valid result.
108
115
// We're now passing in {input: string} which is still assignable to {input: string | null}
109
116
runQueryB ( optionalInputRequiredOutput ) ;
110
117
111
118
// valid: we now accept {output: null} as a valid Result
112
- declare const optionalInputOptionalOutput : TypedQueryDocumentNode < { output : string | null } , { input : string | null } > ;
119
+ declare const optionalInputOptionalOutput : TypedQueryDocumentNode <
120
+ { output : string | null } ,
121
+ { input : string | null }
122
+ > ;
113
123
runQueryB ( optionalInputOptionalOutput ) ;
114
124
115
125
// valid: we now only pass {input: string} to the query
116
- declare const requiredInputRequiredOutput : TypedQueryDocumentNode < { output : string } , { input : string } > ;
126
+ declare const requiredInputRequiredOutput : TypedQueryDocumentNode <
127
+ { output : string } ,
128
+ { input : string }
129
+ > ;
117
130
runQueryB ( requiredInputRequiredOutput ) ;
118
131
119
132
// valid: we now accept {output: null} as a valid Result AND
120
133
// we now only pass {input: string} to the query
121
- declare const requiredInputOptionalOutput : TypedQueryDocumentNode < { output : null } , { input : string } > ;
134
+ declare const requiredInputOptionalOutput : TypedQueryDocumentNode <
135
+ { output : null } ,
136
+ { input : string }
137
+ > ;
122
138
runQueryB ( requiredInputOptionalOutput ) ;
0 commit comments