diff --git a/mode/javascript/javascript.js b/mode/javascript/javascript.js
index <HASH>..<HASH> 100644
--- a/mode/javascript/javascript.js
+++ b/mode/javascript/javascript.js
@@ -634,11 +634,8 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
     if (type == "variable") {register(value); return cont(classNameAfter);}
   }
   function classNameAfter(type, value) {
-    if (value == "extends" || value == "implements") {
-      return isTS ?
-        cont(commasep(typeexpr, "{"), pushlex("}"), classBody, poplex) :
-        cont(expression, classNameAfter);
-    }
+    if (value == "extends" || value == "implements" || (isTS && type == ","))
+      return cont(isTS ? typeexpr : expression, classNameAfter);
     if (type == "{") return cont(pushlex("}"), classBody, poplex);
   }
   function classBody(type, value) {
[javascript mode] Simplify <I>b<I>cf<I>

Issue #<I>