From 5fbeb20df864721e2acbb7bff56ff234abf9e3fb Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Tue, 9 Aug 2022 12:55:49 +0100
Subject: [PATCH] Some small tidying up (#9149)

* Remove stale comment

* Fix typing

* Install katex type definitions
---
 package.json                             | 1 +
 src/components/structures/MatrixChat.tsx | 2 +-
 src/linkify-matrix.ts                    | 4 ++--
 yarn.lock                                | 5 +++++
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/package.json b/package.json
index 1973a2f5b5..933ccfd7ad 100644
--- a/package.json
+++ b/package.json
@@ -150,6 +150,7 @@
     "@types/flux": "^3.1.9",
     "@types/fs-extra": "^9.0.13",
     "@types/jest": "^26.0.20",
+    "@types/katex": "^0.14.0",
     "@types/lodash": "^4.14.168",
     "@types/modernizr": "^3.5.3",
     "@types/node": "^14.14.22",
diff --git a/src/components/structures/MatrixChat.tsx b/src/components/structures/MatrixChat.tsx
index 41be62e1e6..8c173a3630 100644
--- a/src/components/structures/MatrixChat.tsx
+++ b/src/components/structures/MatrixChat.tsx
@@ -157,7 +157,7 @@ interface IScreen {
     params?: QueryDict;
 }
 
-interface IProps { // TODO type things better
+interface IProps {
     config: IConfigOptions;
     serverConfig?: ValidatedServerConfig;
     onNewScreen: (screen: string, replaceLast: boolean) => void;
diff --git a/src/linkify-matrix.ts b/src/linkify-matrix.ts
index b626756f7c..896784cb45 100644
--- a/src/linkify-matrix.ts
+++ b/src/linkify-matrix.ts
@@ -130,8 +130,8 @@ function onAliasClick(event: MouseEvent, roomAlias: string) {
     });
 }
 
-const escapeRegExp = function(string): string {
-    return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
+const escapeRegExp = function(s: string): string {
+    return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
 };
 
 // Recognise URLs from both our local and official Element deployments.
diff --git a/yarn.lock b/yarn.lock
index de8172c728..f2f623b7ed 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2094,6 +2094,11 @@
   resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
   integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==
 
+"@types/katex@^0.14.0":
+  version "0.14.0"
+  resolved "https://registry.yarnpkg.com/@types/katex/-/katex-0.14.0.tgz#b84c0afc3218069a5ad64fe2a95321881021b5fe"
+  integrity sha512-+2FW2CcT0K3P+JMR8YG846bmDwplKUTsWgT2ENwdQ1UdVfRk3GQrh6Mi4sTopy30gI8Uau5CEqHTDZ6YvWIUPA==
+
 "@types/lodash@^4.14.168":
   version "4.14.182"
   resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.182.tgz#05301a4d5e62963227eaafe0ce04dd77c54ea5c2"