Skip to content

Commit 02050aa

Browse files
committed
[javascript mode] Recognize TypeScript suffix-exclamation-mark operator
Closes #4917
1 parent 8ef19b4 commit 02050aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mode/javascript/javascript.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
433433
var expr = noComma == false ? expression : expressionNoComma;
434434
if (type == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);
435435
if (type == "operator") {
436-
if (/\+\+|--/.test(value)) return cont(me);
436+
if (/\+\+|--/.test(value) || isTS && value == "!") return cont(me);
437437
if (value == "?") return cont(expression, expect(":"), expr);
438438
return cont(expr);
439439
}

0 commit comments

Comments
 (0)