Skip to content

Commit 89f9f72

Browse files
Convert type definitions subtypes to be exact (#2082)
In preparation for #1527
1 parent f85d9b6 commit 89f9f72

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

src/type/definition.js

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ export type GraphQLField<
895895
TSource,
896896
TContext,
897897
TArgs = { [argument: string]: any, ... },
898-
> = {
898+
> = {|
899899
name: string,
900900
description: ?string,
901901
type: GraphQLOutputType,
@@ -905,17 +905,15 @@ export type GraphQLField<
905905
isDeprecated?: boolean,
906906
deprecationReason?: ?string,
907907
astNode?: ?FieldDefinitionNode,
908-
...
909-
};
908+
|};
910909

911-
export type GraphQLArgument = {
910+
export type GraphQLArgument = {|
912911
name: string,
913912
type: GraphQLInputType,
914913
defaultValue?: mixed,
915914
description?: ?string,
916915
astNode?: ?InputValueDefinitionNode,
917-
...
918-
};
916+
|};
919917

920918
export function isRequiredArgument(arg: GraphQLArgument): boolean %checks {
921919
return isNonNullType(arg.type) && arg.defaultValue === undefined;
@@ -1273,15 +1271,14 @@ export type GraphQLEnumValueConfig /* <T> */ = {|
12731271
astNode?: ?EnumValueDefinitionNode,
12741272
|};
12751273

1276-
export type GraphQLEnumValue /* <T> */ = {
1274+
export type GraphQLEnumValue /* <T> */ = {|
12771275
name: string,
12781276
description: ?string,
12791277
isDeprecated?: boolean,
12801278
deprecationReason: ?string,
12811279
astNode?: ?EnumValueDefinitionNode,
12821280
value: any /* T */,
1283-
...
1284-
};
1281+
|};
12851282

12861283
/**
12871284
* Input Object Type Definition
@@ -1392,14 +1389,13 @@ export type GraphQLInputFieldConfig = {|
13921389

13931390
export type GraphQLInputFieldConfigMap = ObjMap<GraphQLInputFieldConfig>;
13941391

1395-
export type GraphQLInputField = {
1392+
export type GraphQLInputField = {|
13961393
name: string,
13971394
type: GraphQLInputType,
13981395
defaultValue?: mixed,
13991396
description?: ?string,
14001397
astNode?: ?InputValueDefinitionNode,
1401-
...
1402-
};
1398+
|};
14031399

14041400
export function isRequiredInputField(
14051401
field: GraphQLInputField,

0 commit comments

Comments
 (0)