Skip to content

Commit

Permalink
Remove use of existential type in validation tests (#2031)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Jul 11, 2019
1 parent ae34ef9 commit b40291f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/type/__tests__/validation-test.js
Expand Up @@ -55,7 +55,9 @@ const SomeInputObjectType = new GraphQLInputObjectType({
},
});

function withModifiers<T: GraphQLNamedType>(types: Array<T>): Array<*> {
function withModifiers<T: GraphQLNamedType>(
types: Array<T>,
): Array<T | GraphQLList<T> | GraphQLNonNull<T | GraphQLList<T>>> {
return [
...types,
...types.map(type => GraphQLList(type)),
Expand All @@ -64,7 +66,7 @@ function withModifiers<T: GraphQLNamedType>(types: Array<T>): Array<*> {
];
}

const outputTypes: Array<GraphQLOutputType> = withModifiers([
const outputTypes = withModifiers([
GraphQLString,
SomeScalarType,
SomeEnumType,
Expand All @@ -73,18 +75,16 @@ const outputTypes: Array<GraphQLOutputType> = withModifiers([
SomeInterfaceType,
]);

const notOutputTypes: Array<GraphQLInputType> = withModifiers([
SomeInputObjectType,
]);
const notOutputTypes = withModifiers([SomeInputObjectType]);

const inputTypes: Array<GraphQLInputType> = withModifiers([
const inputTypes = withModifiers([
GraphQLString,
SomeScalarType,
SomeEnumType,
SomeInputObjectType,
]);

const notInputTypes: Array<GraphQLOutputType> = withModifiers([
const notInputTypes = withModifiers([
SomeObjectType,
SomeUnionType,
SomeInterfaceType,
Expand Down

0 comments on commit b40291f

Please sign in to comment.