Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

ts: Migrate `spectators.js` to typescript.

Lalit Kumar Singha0cb03473148
diff --git a/tools/test-js-with-node b/tools/test-js-with-node
index 2ac2ef888aa..90f5643ff24 100755
--- a/tools/test-js-with-node
+++ b/tools/test-js-with-node
@@ -181,7 +181,7 @@ EXEMPT_FILES = make_set(
"web/src/settings_user_topics.js",
"web/src/settings_users.js",
"web/src/setup.ts",
- "web/src/spectators.js",
+ "web/src/spectators.ts",
"web/src/spoilers.ts",
"web/src/starred_messages_ui.js",
"web/src/stream_bar.js",
diff --git a/web/src/spectators.js b/web/src/spectators.ts
similarity index 95%
rename from web/src/spectators.js
rename to web/src/spectators.ts
index 68a517ed2c9..40b6079ce34 100644
--- a/web/src/spectators.js
+++ b/web/src/spectators.ts
@@ -14,7 +14,7 @@ import * as hash_util from "./hash_util";
import * as overlays from "./overlays";
import {page_params} from "./page_params";
-export function login_to_access(empty_narrow) {
+export function login_to_access(empty_narrow?: boolean): void {
// Hide all overlays, popover and go back to the previous hash if the
// hash has changed.
const login_link = hash_util.build_login_link();