Skip to content

Commit 0e13835

Browse files
committed
[javascript mode] Fix parsing of TypeScript typeof types
So that they don't consume commas.
1 parent 9ec1245 commit 0e13835

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mode/javascript/javascript.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
565565
function typeexpr(type, value) {
566566
if (value == "keyof" || value == "typeof") {
567567
cx.marked = "keyword"
568-
return cont(value == "keyof" ? typeexpr : expression)
568+
return cont(value == "keyof" ? typeexpr : expressionNoComma)
569569
}
570570
if (type == "variable" || value == "void") {
571571
cx.marked = "type"

0 commit comments

Comments
 (0)