@@ -65,7 +65,7 @@ export type GraphQLType =
6565 | GraphQLList < any >
6666 | GraphQLNonNull < any > ;
6767
68- export function isType ( type : unknown ) : boolean % checks {
68+ export function isType ( type : unknown ) : boolean {
6969 return (
7070 isScalarType ( type ) ||
7171 isObjectType ( type ) ||
@@ -89,8 +89,7 @@ export function assertType(type: unknown): GraphQLType {
8989 * There are predicates for each kind of GraphQL type.
9090 */
9191
92- declare function isScalarType ( type : unknown ) : boolean % checks ( type instanceof
93- GraphQLScalarType ) ;
92+ declare function isScalarType ( type : unknown ) : boolean ;
9493// eslint-disable-next-line no-redeclare
9594export function isScalarType ( type ) {
9695 return instanceOf ( type , GraphQLScalarType ) ;
@@ -103,8 +102,7 @@ export function assertScalarType(type: unknown): GraphQLScalarType {
103102 return type ;
104103}
105104
106- declare function isObjectType ( type : unknown ) : boolean % checks ( type instanceof
107- GraphQLObjectType ) ;
105+ declare function isObjectType ( type : unknown ) : boolean ;
108106// eslint-disable-next-line no-redeclare
109107export function isObjectType ( type ) {
110108 return instanceOf ( type , GraphQLObjectType ) ;
@@ -117,8 +115,7 @@ export function assertObjectType(type: unknown): GraphQLObjectType {
117115 return type ;
118116}
119117
120- declare function isInterfaceType ( type : unknown ) : boolean % checks ( type instanceof
121- GraphQLInterfaceType ) ;
118+ declare function isInterfaceType ( type : unknown ) : boolean ;
122119// eslint-disable-next-line no-redeclare
123120export function isInterfaceType ( type ) {
124121 return instanceOf ( type , GraphQLInterfaceType ) ;
@@ -133,8 +130,7 @@ export function assertInterfaceType(type: unknown): GraphQLInterfaceType {
133130 return type ;
134131}
135132
136- declare function isUnionType ( type : unknown ) : boolean % checks ( type instanceof
137- GraphQLUnionType ) ;
133+ declare function isUnionType ( type : unknown ) : boolean ;
138134// eslint-disable-next-line no-redeclare
139135export function isUnionType ( type ) {
140136 return instanceOf ( type , GraphQLUnionType ) ;
@@ -147,8 +143,7 @@ export function assertUnionType(type: unknown): GraphQLUnionType {
147143 return type ;
148144}
149145
150- declare function isEnumType ( type : unknown ) : boolean % checks ( type instanceof
151- GraphQLEnumType ) ;
146+ declare function isEnumType ( type : unknown ) : boolean ;
152147// eslint-disable-next-line no-redeclare
153148export function isEnumType ( type ) {
154149 return instanceOf ( type , GraphQLEnumType ) ;
@@ -161,8 +156,7 @@ export function assertEnumType(type: unknown): GraphQLEnumType {
161156 return type ;
162157}
163158
164- declare function isInputObjectType ( type : unknown ) : boolean % checks ( type instanceof
165- GraphQLInputObjectType ) ;
159+ declare function isInputObjectType ( type : unknown ) : boolean ;
166160// eslint-disable-next-line no-redeclare
167161export function isInputObjectType ( type ) {
168162 return instanceOf ( type , GraphQLInputObjectType ) ;
@@ -177,8 +171,7 @@ export function assertInputObjectType(type: unknown): GraphQLInputObjectType {
177171 return type ;
178172}
179173
180- declare function isListType ( type : unknown ) : boolean % checks ( type instanceof
181- GraphQLList ) ;
174+ declare function isListType ( type : unknown ) : boolean ;
182175// eslint-disable-next-line no-redeclare
183176export function isListType ( type ) {
184177 return instanceOf ( type , GraphQLList ) ;
@@ -191,8 +184,7 @@ export function assertListType(type: unknown): GraphQLList<any> {
191184 return type ;
192185}
193186
194- declare function isNonNullType ( type : unknown ) : boolean % checks ( type instanceof
195- GraphQLNonNull ) ;
187+ declare function isNonNullType ( type : unknown ) : boolean ;
196188// eslint-disable-next-line no-redeclare
197189export function isNonNullType ( type ) {
198190 return instanceOf ( type , GraphQLNonNull ) ;
@@ -220,7 +212,7 @@ export type GraphQLInputType =
220212 | GraphQLList < GraphQLInputType > ,
221213 > ;
222214
223- export function isInputType ( type : unknown ) : boolean % checks {
215+ export function isInputType ( type : unknown ) : boolean {
224216 return (
225217 isScalarType ( type ) ||
226218 isEnumType ( type ) ||
@@ -255,7 +247,7 @@ export type GraphQLOutputType =
255247 | GraphQLList < GraphQLOutputType > ,
256248 > ;
257249
258- export function isOutputType ( type : unknown ) : boolean % checks {
250+ export function isOutputType ( type : unknown ) : boolean {
259251 return (
260252 isScalarType ( type ) ||
261253 isObjectType ( type ) ||
@@ -278,7 +270,7 @@ export function assertOutputType(type: unknown): GraphQLOutputType {
278270 */
279271export type GraphQLLeafType = GraphQLScalarType | GraphQLEnumType ;
280272
281- export function isLeafType ( type : unknown ) : boolean % checks {
273+ export function isLeafType ( type : unknown ) : boolean {
282274 return isScalarType ( type ) || isEnumType ( type ) ;
283275}
284276
@@ -297,7 +289,7 @@ export type GraphQLCompositeType =
297289 | GraphQLInterfaceType
298290 | GraphQLUnionType ;
299291
300- export function isCompositeType ( type : unknown ) : boolean % checks {
292+ export function isCompositeType ( type : unknown ) : boolean {
301293 return isObjectType ( type ) || isInterfaceType ( type ) || isUnionType ( type ) ;
302294}
303295
@@ -315,7 +307,7 @@ export function assertCompositeType(type: unknown): GraphQLCompositeType {
315307 */
316308export type GraphQLAbstractType = GraphQLInterfaceType | GraphQLUnionType ;
317309
318- export function isAbstractType ( type : unknown ) : boolean % checks {
310+ export function isAbstractType ( type : unknown ) : boolean {
319311 return isInterfaceType ( type ) || isUnionType ( type ) ;
320312}
321313
@@ -422,7 +414,7 @@ export class GraphQLNonNull<T extends GraphQLNullableType> {
422414
423415export type GraphQLWrappingType = GraphQLList < any > | GraphQLNonNull < any > ;
424416
425- export function isWrappingType ( type : unknown ) : boolean % checks {
417+ export function isWrappingType ( type : unknown ) : boolean {
426418 return isListType ( type ) || isNonNullType ( type ) ;
427419}
428420
@@ -445,7 +437,7 @@ export type GraphQLNullableType =
445437 | GraphQLInputObjectType
446438 | GraphQLList < any > ;
447439
448- export function isNullableType ( type : unknown ) : boolean % checks {
440+ export function isNullableType ( type : unknown ) : boolean {
449441 return isType ( type ) && ! isNonNullType ( type ) ;
450442}
451443
@@ -478,7 +470,7 @@ export type GraphQLNamedType =
478470 | GraphQLEnumType
479471 | GraphQLInputObjectType ;
480472
481- export function isNamedType ( type : unknown ) : boolean % checks {
473+ export function isNamedType ( type : unknown ) : boolean {
482474 return (
483475 isScalarType ( type ) ||
484476 isObjectType ( type ) ||
@@ -986,7 +978,7 @@ export type GraphQLArgument = {
986978 astNode : Maybe < InputValueDefinitionNode > ,
987979} ;
988980
989- export function isRequiredArgument ( arg : GraphQLArgument ) : boolean % checks {
981+ export function isRequiredArgument ( arg : GraphQLArgument ) : boolean {
990982 return isNonNullType ( arg . type ) && arg . defaultValue === undefined ;
991983}
992984
@@ -1573,7 +1565,7 @@ export type GraphQLInputField = {
15731565
15741566export function isRequiredInputField (
15751567 field : GraphQLInputField ,
1576- ) : boolean % checks {
1568+ ) : boolean {
15771569 return isNonNullType ( field . type ) && field . defaultValue === undefined ;
15781570}
15791571
0 commit comments