We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
lexValue
1 parent afffdfe commit 8109e42Copy full SHA for 8109e42
src/language/__tests__/blockString-fuzz.js
@@ -10,10 +10,11 @@ import { Lexer } from '../lexer';
10
import { Source } from '../source';
11
import { printBlockString } from '../blockString';
12
13
-function lexValue(str: string) {
+function lexValue(str: string): string {
14
const lexer = new Lexer(new Source(str));
15
const value = lexer.advance().value;
16
17
+ invariant(typeof value === 'string');
18
invariant(lexer.advance().kind === '<EOF>', 'Expected EOF');
19
return value;
20
}
0 commit comments