@@ -105,7 +105,7 @@ export function getHoverInformation(
105
105
return '' ;
106
106
}
107
107
108
- function renderMdCodeStart ( into : string [ ] , options : any ) {
108
+ function renderMdCodeStart ( into : string [ ] , options : HoverConfig ) {
109
109
if ( options . useMarkdown ) {
110
110
text ( into , '```graphql\n' ) ;
111
111
}
@@ -119,7 +119,7 @@ function renderMdCodeEnd(into: string[], options: any) {
119
119
export function renderField (
120
120
into : string [ ] ,
121
121
typeInfo : AllTypeInfo ,
122
- options : any ,
122
+ options : HoverConfig ,
123
123
) {
124
124
renderQualifiedField ( into , typeInfo , options ) ;
125
125
renderTypeAnnotation ( into , typeInfo , options , typeInfo . type ! ) ;
@@ -128,7 +128,7 @@ export function renderField(
128
128
function renderQualifiedField (
129
129
into : string [ ] ,
130
130
typeInfo : AllTypeInfo ,
131
- options : any ,
131
+ options : HoverConfig ,
132
132
) {
133
133
if ( ! typeInfo . fieldDef ) {
134
134
return ;
@@ -144,7 +144,7 @@ function renderQualifiedField(
144
144
export function renderDirective (
145
145
into : string [ ] ,
146
146
typeInfo : AllTypeInfo ,
147
- _options : any ,
147
+ _options : HoverConfig ,
148
148
) {
149
149
if ( ! typeInfo . directiveDef ) {
150
150
return ;
@@ -153,7 +153,11 @@ export function renderDirective(
153
153
text ( into , name ) ;
154
154
}
155
155
156
- export function renderArg ( into : string [ ] , typeInfo : AllTypeInfo , options : any ) {
156
+ export function renderArg (
157
+ into : string [ ] ,
158
+ typeInfo : AllTypeInfo ,
159
+ options : HoverConfig ,
160
+ ) {
157
161
if ( typeInfo . directiveDef ) {
158
162
renderDirective ( into , typeInfo , options ) ;
159
163
} else if ( typeInfo . fieldDef ) {
@@ -174,7 +178,7 @@ export function renderArg(into: string[], typeInfo: AllTypeInfo, options: any) {
174
178
function renderTypeAnnotation (
175
179
into : string [ ] ,
176
180
typeInfo : AllTypeInfo ,
177
- options : any ,
181
+ options : HoverConfig ,
178
182
t : GraphQLType ,
179
183
) {
180
184
text ( into , ': ' ) ;
@@ -184,7 +188,7 @@ function renderTypeAnnotation(
184
188
export function renderEnumValue (
185
189
into : string [ ] ,
186
190
typeInfo : AllTypeInfo ,
187
- options : any ,
191
+ options : HoverConfig ,
188
192
) {
189
193
if ( ! typeInfo . enumValue ) {
190
194
return ;
@@ -198,7 +202,7 @@ export function renderEnumValue(
198
202
export function renderType (
199
203
into : string [ ] ,
200
204
typeInfo : AllTypeInfo ,
201
- options : any ,
205
+ options : HoverConfig ,
202
206
t : GraphQLType ,
203
207
) {
204
208
if ( ! t ) {
@@ -219,7 +223,7 @@ export function renderType(
219
223
220
224
function renderDescription (
221
225
into : string [ ] ,
222
- options : any ,
226
+ options : HoverConfig ,
223
227
// TODO: Figure out the right type for this one
224
228
def : any ,
225
229
) {
@@ -237,14 +241,14 @@ function renderDescription(
237
241
238
242
function renderDeprecation (
239
243
into : string [ ] ,
240
- _options : any ,
241
- def : GraphQLField < any , any > | GraphQLFieldConfig < any , any > ,
244
+ _options : HoverConfig ,
245
+ def : GraphQLField < unknown , unknown > | GraphQLFieldConfig < unknown , unknown > ,
242
246
) {
243
247
if ( ! def ) {
244
248
return ;
245
249
}
246
250
247
- const reason = def . deprecationReason || null ;
251
+ const reason = def . deprecationReason ;
248
252
if ( ! reason ) {
249
253
return ;
250
254
}
0 commit comments