Skip to content

Commit 9610f73

Browse files
committed
Remove use of existential type in validation tests
1 parent ae34ef9 commit 9610f73

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/type/__tests__/validation-test.js

+7-5
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,18 @@ const outputTypes: Array<GraphQLOutputType> = withModifiers([
7375
SomeInterfaceType,
7476
]);
7577

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

80-
const inputTypes: Array<GraphQLInputType> = withModifiers([
82+
const inputTypes = withModifiers([
8183
GraphQLString,
8284
SomeScalarType,
8385
SomeEnumType,
8486
SomeInputObjectType,
8587
]);
8688

87-
const notInputTypes: Array<GraphQLOutputType> = withModifiers([
89+
const notInputTypes = withModifiers([
8890
SomeObjectType,
8991
SomeUnionType,
9092
SomeInterfaceType,

0 commit comments

Comments
 (0)