-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sync language TS definitions with Flow (#2107)
* Sync language TS definitions with Flow * [] => never[], as empty tuple is invalid in TS@2
- Loading branch information
1 parent
49f86be
commit 9366d6d
Showing
8 changed files
with
181 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { Location } from '../language/ast'; | ||
import { Source } from '../language/source'; | ||
import { SourceLocation } from '../language/location'; | ||
|
||
/** | ||
* Render a helpful description of the location in the GraphQL Source document. | ||
*/ | ||
export function printLocation(location: Location): string; | ||
|
||
/** | ||
* Render a helpful description of the location in the GraphQL Source document. | ||
*/ | ||
export function printSourceLocation( | ||
source: Source, | ||
sourceLocation: SourceLocation, | ||
): string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* An exported enum describing the different kinds of tokens that the | ||
* lexer emits. | ||
*/ | ||
export const TokenKind: _TokenKind; | ||
|
||
type _TokenKind = { | ||
SOF: '<SOF>'; | ||
EOF: '<EOF>'; | ||
BANG: '!'; | ||
DOLLAR: '$'; | ||
AMP: '&'; | ||
PAREN_L: '('; | ||
PAREN_R: ')'; | ||
SPREAD: '...'; | ||
COLON: ':'; | ||
EQUALS: '='; | ||
AT: '@'; | ||
BRACKET_L: '['; | ||
BRACKET_R: ']'; | ||
BRACE_L: '{'; | ||
PIPE: '|'; | ||
BRACE_R: '}'; | ||
NAME: 'Name'; | ||
INT: 'Int'; | ||
FLOAT: 'Float'; | ||
STRING: 'String'; | ||
BLOCK_STRING: 'BlockString'; | ||
COMMENT: 'Comment'; | ||
}; | ||
|
||
/** | ||
* The enum type representing the token kinds values. | ||
*/ | ||
export type TokenKindEnum = _TokenKind[keyof _TokenKind]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters