Skip to content

Commit 12cc4bc

Browse files
committed
[javascript mode] Recognize typescript declare keyword
Closes #4915
1 parent 369d3ce commit 12cc4bc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mode/javascript/javascript.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,9 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
363363
if (isTS && value == "type") {
364364
cx.marked = "keyword"
365365
return cont(typeexpr, expect("operator"), typeexpr, expect(";"));
366+
} if (isTS && value == "declare") {
367+
cx.marked = "keyword"
368+
return cont(statement)
366369
} else {
367370
return cont(pushlex("stat"), maybelabel);
368371
}

0 commit comments

Comments
 (0)