diff --git a/src/language/directiveLocation.d.ts b/src/language/directiveLocation.d.ts index 31365f5901..225e129cd8 100644 --- a/src/language/directiveLocation.d.ts +++ b/src/language/directiveLocation.d.ts @@ -1,12 +1,7 @@ /** * The set of allowed directive location values. */ -export const DirectiveLocation: _DirectiveLocation; - -/** - * @internal - */ -type _DirectiveLocation = { +export const DirectiveLocation: { // Request Definitions QUERY: 'QUERY'; MUTATION: 'MUTATION'; @@ -34,4 +29,4 @@ type _DirectiveLocation = { /** * The enum type representing the directive location values. */ -export type DirectiveLocationEnum = _DirectiveLocation[keyof _DirectiveLocation]; +export type DirectiveLocationEnum = typeof DirectiveLocation[keyof typeof DirectiveLocation]; diff --git a/src/language/kinds.d.ts b/src/language/kinds.d.ts index e655af00d8..35a7239923 100644 --- a/src/language/kinds.d.ts +++ b/src/language/kinds.d.ts @@ -1,12 +1,7 @@ /** * The set of allowed kind values for AST nodes. */ -export const Kind: _Kind; - -/** - * @internal - */ -type _Kind = { +export const Kind: { // Name NAME: 'Name'; @@ -76,4 +71,4 @@ type _Kind = { /** * The enum type representing the possible kind values of AST nodes. */ -export type KindEnum = _Kind[keyof _Kind]; +export type KindEnum = typeof Kind[keyof typeof Kind]; diff --git a/src/language/tokenKind.d.ts b/src/language/tokenKind.d.ts index 9919487e90..fa27e23293 100644 --- a/src/language/tokenKind.d.ts +++ b/src/language/tokenKind.d.ts @@ -2,9 +2,7 @@ * An exported enum describing the different kinds of tokens that the * lexer emits. */ -export const TokenKind: _TokenKind; - -type _TokenKind = { +export const TokenKind: { SOF: ''; EOF: ''; BANG: '!'; @@ -32,4 +30,4 @@ type _TokenKind = { /** * The enum type representing the token kinds values. */ -export type TokenKindEnum = _TokenKind[keyof _TokenKind]; +export type TokenKindEnum = typeof TokenKind[keyof typeof TokenKind]; diff --git a/src/utilities/findBreakingChanges.d.ts b/src/utilities/findBreakingChanges.d.ts index 8d9f71a702..df35805f17 100644 --- a/src/utilities/findBreakingChanges.d.ts +++ b/src/utilities/findBreakingChanges.d.ts @@ -1,11 +1,6 @@ import { GraphQLSchema } from '../type/schema'; -export const BreakingChangeType: _BreakingChangeType; - -/** - * @internal - */ -type _BreakingChangeType = { +export const BreakingChangeType: { TYPE_REMOVED: 'TYPE_REMOVED'; TYPE_CHANGED_KIND: 'TYPE_CHANGED_KIND'; TYPE_REMOVED_FROM_UNION: 'TYPE_REMOVED_FROM_UNION'; @@ -24,12 +19,7 @@ type _BreakingChangeType = { DIRECTIVE_LOCATION_REMOVED: 'DIRECTIVE_LOCATION_REMOVED'; }; -export const DangerousChangeType: _DangerousChangeType; - -/** - * @internal - */ -type _DangerousChangeType = { +export const DangerousChangeType: { VALUE_ADDED_TO_ENUM: 'VALUE_ADDED_TO_ENUM'; TYPE_ADDED_TO_UNION: 'TYPE_ADDED_TO_UNION'; OPTIONAL_INPUT_FIELD_ADDED: 'OPTIONAL_INPUT_FIELD_ADDED'; @@ -39,12 +29,12 @@ type _DangerousChangeType = { }; export interface BreakingChange { - type: keyof _BreakingChangeType; + type: keyof typeof BreakingChangeType; description: string; } export interface DangerousChange { - type: keyof _DangerousChangeType; + type: keyof typeof DangerousChangeType; description: string; }