Skip to content

Commit b40291f

Browse files
Remove use of existential type in validation tests (#2031)
1 parent ae34ef9 commit b40291f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/type/__tests__/validation-test.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ const SomeInputObjectType = new GraphQLInputObjectType({
5555
},
5656
});
5757

58-
function withModifiers<T: GraphQLNamedType>(types: Array<T>): Array<*> {
58+
function withModifiers<T: GraphQLNamedType>(
59+
types: Array<T>,
60+
): Array<T | GraphQLList<T> | GraphQLNonNull<T | GraphQLList<T>>> {
5961
return [
6062
...types,
6163
...types.map(type => GraphQLList(type)),
@@ -64,7 +66,7 @@ function withModifiers<T: GraphQLNamedType>(types: Array<T>): Array<*> {
6466
];
6567
}
6668

67-
const outputTypes: Array<GraphQLOutputType> = withModifiers([
69+
const outputTypes = withModifiers([
6870
GraphQLString,
6971
SomeScalarType,
7072
SomeEnumType,
@@ -73,18 +75,16 @@ const outputTypes: Array<GraphQLOutputType> = withModifiers([
7375
SomeInterfaceType,
7476
]);
7577

76-
const notOutputTypes: Array<GraphQLInputType> = withModifiers([
77-
SomeInputObjectType,
78-
]);
78+
const notOutputTypes = withModifiers([SomeInputObjectType]);
7979

80-
const inputTypes: Array<GraphQLInputType> = withModifiers([
80+
const inputTypes = withModifiers([
8181
GraphQLString,
8282
SomeScalarType,
8383
SomeEnumType,
8484
SomeInputObjectType,
8585
]);
8686

87-
const notInputTypes: Array<GraphQLOutputType> = withModifiers([
87+
const notInputTypes = withModifiers([
8888
SomeObjectType,
8989
SomeUnionType,
9090
SomeInterfaceType,

0 commit comments

Comments
 (0)