Skip to content

Commit 76e37d5

Browse files
Convert more object types to be exact (#1483)
1 parent 0464006 commit 76e37d5

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/__tests__/starWarsData.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,23 +100,23 @@ export type Character = {
100100
appearsIn: Array<number>,
101101
};
102102

103-
export type Human = {
103+
export type Human = {|
104104
type: 'Human',
105105
id: string,
106106
name: string,
107107
friends: Array<string>,
108108
appearsIn: Array<number>,
109109
homePlanet: string,
110-
};
110+
|};
111111

112-
export type Droid = {
112+
export type Droid = {|
113113
type: 'Droid',
114114
id: string,
115115
name: string,
116116
friends: Array<string>,
117117
appearsIn: Array<number>,
118118
primaryFunction: string,
119-
};
119+
|};
120120

121121
/**
122122
* Helper function to get a character by ID.

src/execution/execute.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ import type {
9494
* Namely, schema of the type system that is currently executing,
9595
* and the fragments defined in the query document
9696
*/
97-
export type ExecutionContext = {
97+
export type ExecutionContext = {|
9898
schema: GraphQLSchema,
9999
fragments: ObjMap<FragmentDefinitionNode>,
100100
rootValue: mixed,
@@ -103,7 +103,7 @@ export type ExecutionContext = {
103103
variableValues: { [variable: string]: mixed },
104104
fieldResolver: GraphQLFieldResolver<any, any>,
105105
errors: Array<GraphQLError>,
106-
};
106+
|};
107107

108108
/**
109109
* The result of GraphQL execution.

src/language/ast.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export type ASTNode =
136136
/**
137137
* Utility type listing all nodes indexed by their kind.
138138
*/
139-
export type ASTKindToNode = {
139+
export type ASTKindToNode = {|
140140
Name: NameNode,
141141
Document: DocumentNode,
142142
OperationDefinition: OperationDefinitionNode,
@@ -180,7 +180,7 @@ export type ASTKindToNode = {
180180
UnionTypeExtension: UnionTypeExtensionNode,
181181
EnumTypeExtension: EnumTypeExtensionNode,
182182
InputObjectTypeExtension: InputObjectTypeExtensionNode,
183-
};
183+
|};
184184

185185
// Name
186186

src/language/source.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
import invariant from '../jsutils/invariant';
1111
import defineToStringTag from '../jsutils/defineToStringTag';
1212

13-
type Location = {
13+
type Location = {|
1414
line: number,
1515
column: number,
16-
};
16+
|};
1717

1818
/**
1919
* A representation of source input to GraphQL.

0 commit comments

Comments
 (0)