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.

stream_muting: Convert module to typescript.

evykassirerb066f58c54d0
diff --git a/tools/test-js-with-node b/tools/test-js-with-node
index 57766ab33b3..7590d65451d 100755
--- a/tools/test-js-with-node
+++ b/tools/test-js-with-node
@@ -241,7 +241,7 @@ EXEMPT_FILES = make_set(
"web/src/stream_edit_subscribers.ts",
"web/src/stream_edit_toggler.ts",
"web/src/stream_list.ts",
- "web/src/stream_muting.js",
+ "web/src/stream_muting.ts",
"web/src/stream_popover.js",
"web/src/stream_settings_api.ts",
"web/src/stream_settings_components.ts",
diff --git a/web/src/stream_events.js b/web/src/stream_events.js
index 865fc643273..a5cba2c9dd7 100644
--- a/web/src/stream_events.js
+++ b/web/src/stream_events.js
@@ -24,7 +24,7 @@ import * as stream_color_events from "./stream_color_events.ts";
import * as stream_create from "./stream_create.ts";
import * as stream_data from "./stream_data.ts";
import * as stream_list from "./stream_list.ts";
-import * as stream_muting from "./stream_muting.js";
+import * as stream_muting from "./stream_muting.ts";
import * as stream_settings_api from "./stream_settings_api.ts";
import * as stream_settings_ui from "./stream_settings_ui.js";
import * as sub_store from "./sub_store.ts";
diff --git a/web/src/stream_muting.js b/web/src/stream_muting.ts
similarity index 88%
rename from web/src/stream_muting.js
rename to web/src/stream_muting.ts
index de4ac801098..79c4089431e 100644
--- a/web/src/stream_muting.js
+++ b/web/src/stream_muting.ts
@@ -2,9 +2,10 @@ import * as message_lists from "./message_lists.ts";
import * as settings_notifications from "./settings_notifications.ts";
import * as stream_edit from "./stream_edit.ts";
import * as stream_list from "./stream_list.ts";
+import type {StreamSubscription} from "./sub_store.ts";
import * as unread_ui from "./unread_ui.ts";
-export function update_is_muted(sub, value) {
+export function update_is_muted(sub: StreamSubscription, value: boolean): void {
sub.is_muted = value;
for (const msg_list of message_lists.all_rendered_message_lists()) {