Skip to content
This repository has been archived by the owner on Apr 15, 2020. It is now read-only.

Commit

Permalink
fix(types): enforce VisitSchemaKind enum
Browse files Browse the repository at this point in the history
  • Loading branch information
yaacovCR committed Oct 13, 2019
1 parent 2a54adc commit 2e60509
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,7 @@ export enum VisitSchemaKind {
SUBSCRIPTION = 'VisitSchemaKind.SUBSCRIPTION',
}

// I couldn't make keys to be forced to be enum values
export type SchemaVisitorMap = { [key: string]: TypeVisitor };
export type SchemaVisitorMap = { [key in VisitSchemaKind]?: TypeVisitor };
export type TypeVisitor = (
type: GraphQLType,
schema: GraphQLSchema,
Expand Down

0 comments on commit 2e60509

Please sign in to comment.