diff --git a/mode/javascript/javascript.js b/mode/javascript/javascript.js
index da6b760f78bac3511060252b11181674c5908680..79239ef46fe69b7be3d15f814790f9a1adfb1ea6 100644
--- a/mode/javascript/javascript.js
+++ b/mode/javascript/javascript.js
@@ -525,6 +525,15 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
   }
   function typeexpr(type) {
     if (type == "variable") {cx.marked = "variable-3"; return cont(afterType);}
+    if (type == "{") return cont(commasep(typeprop, "}"))
+  }
+  function typeprop(type, value) {
+    if (type == "variable" || cx.style == "keyword") {
+      cx.marked = "property"
+      return cont(typeprop)
+    } else if (type == ":") {
+      return cont(typeexpr)
+    }
   }
   function afterType(type, value) {
     if (value == "<") return cont(commasep(typeexpr, ">"), afterType)