Skip to content

Commit 2f43bcc

Browse files
committed
[javascript mode] Recognize TypeScript class fields without type
Closes codemirror#4643
1 parent 66c68db commit 2f43bcc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mode/javascript/javascript.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
662662
function classfield(type, value) {
663663
if (value == "?") return cont(classfield)
664664
if (type == ":") return cont(typeexpr, maybeAssign)
665+
if (value == "=") return cont(expressionNoComma)
665666
return pass(functiondef)
666667
}
667668
function afterExport(type, value) {

0 commit comments

Comments
 (0)