Skip to content

Commit

Permalink
[javascript mode] Support TypeScript this parameter declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
marijnh authored and cone56 committed Jan 6, 2020
1 parent e61138c commit 22df45e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mode/javascript/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
if (value == "@") cont(expression, funarg)
if (type == "spread") return cont(funarg);
if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(funarg); }
if (isTS && type == "this") return cont(maybetype, maybeAssign)
return pass(pattern, maybetype, maybeAssign);
}
function classExpression(type, value) {
Expand Down

0 comments on commit 22df45e

Please sign in to comment.