Skip to content

Commit 8109e42

Browse files
blockString-fuzz: improve lexValue typing (#2966)
1 parent afffdfe commit 8109e42

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/language/__tests__/blockString-fuzz.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ import { Lexer } from '../lexer';
1010
import { Source } from '../source';
1111
import { printBlockString } from '../blockString';
1212

13-
function lexValue(str: string) {
13+
function lexValue(str: string): string {
1414
const lexer = new Lexer(new Source(str));
1515
const value = lexer.advance().value;
1616

17+
invariant(typeof value === 'string');
1718
invariant(lexer.advance().kind === '<EOF>', 'Expected EOF');
1819
return value;
1920
}

0 commit comments

Comments
 (0)