Skip to content

Commit

Permalink
Convert more object types to be exact (#1483)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov authored Aug 26, 2018
1 parent 0464006 commit 76e37d5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/__tests__/starWarsData.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,23 +100,23 @@ export type Character = {
appearsIn: Array<number>,
};

export type Human = {
export type Human = {|
type: 'Human',
id: string,
name: string,
friends: Array<string>,
appearsIn: Array<number>,
homePlanet: string,
};
|};

export type Droid = {
export type Droid = {|
type: 'Droid',
id: string,
name: string,
friends: Array<string>,
appearsIn: Array<number>,
primaryFunction: string,
};
|};

/**
* Helper function to get a character by ID.
Expand Down
4 changes: 2 additions & 2 deletions src/execution/execute.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ import type {
* Namely, schema of the type system that is currently executing,
* and the fragments defined in the query document
*/
export type ExecutionContext = {
export type ExecutionContext = {|
schema: GraphQLSchema,
fragments: ObjMap<FragmentDefinitionNode>,
rootValue: mixed,
Expand All @@ -103,7 +103,7 @@ export type ExecutionContext = {
variableValues: { [variable: string]: mixed },
fieldResolver: GraphQLFieldResolver<any, any>,
errors: Array<GraphQLError>,
};
|};

/**
* The result of GraphQL execution.
Expand Down
4 changes: 2 additions & 2 deletions src/language/ast.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export type ASTNode =
/**
* Utility type listing all nodes indexed by their kind.
*/
export type ASTKindToNode = {
export type ASTKindToNode = {|
Name: NameNode,
Document: DocumentNode,
OperationDefinition: OperationDefinitionNode,
Expand Down Expand Up @@ -180,7 +180,7 @@ export type ASTKindToNode = {
UnionTypeExtension: UnionTypeExtensionNode,
EnumTypeExtension: EnumTypeExtensionNode,
InputObjectTypeExtension: InputObjectTypeExtensionNode,
};
|};

// Name

Expand Down
4 changes: 2 additions & 2 deletions src/language/source.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
import invariant from '../jsutils/invariant';
import defineToStringTag from '../jsutils/defineToStringTag';

type Location = {
type Location = {|
line: number,
column: number,
};
|};

/**
* A representation of source input to GraphQL.
Expand Down

0 comments on commit 76e37d5

Please sign in to comment.