Merge "Make sure to define the custom-element for codemirror-element"
diff --git a/web/gr-editor.ts b/web/gr-editor.ts
index c461864..05e5dbd 100644
--- a/web/gr-editor.ts
+++ b/web/gr-editor.ts
@@ -10,12 +10,23 @@
 import {customElement, property, query} from 'lit/decorators.js';
 import {setScriptSrc} from './safe-script';
 
+/**
+ * <codemirror-element> is defined in a separate javascript bundle, so let's
+ * define its interface here.
+ */
+interface CodeMirrorElement extends HTMLElement {
+  lineNum?: number;
+  prefs: unknown;
+  fileContent?: string;
+  fileType?: string;
+}
+
 declare global {
   interface HTMLElementTagNameMap {
     'gr-editor': GrEditor;
+    'codemirror-element': CodeMirrorElement;
   }
 }
-
 /**
  * This component just loads the CodeMirror js bundle lazily and converts the
  * Gerrit preferences into CodeMirror params.
diff --git a/web/tsconfig.json b/web/tsconfig.json
index c86c6af..78051ab 100644
--- a/web/tsconfig.json
+++ b/web/tsconfig.json
@@ -5,5 +5,5 @@
   },
   "include": [
     "**/*.ts"
-  ],
-}
\ No newline at end of file
+  ]
+}