Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
ts: Convert `stream_settings_containers.js` to TypeScript.
AcKindle31aeab4077999
diff --git a/tools/test-js-with-node b/tools/test-js-with-nodeindex 34a735c951b..6212d560ec9 100755--- a/tools/test-js-with-node+++ b/tools/test-js-with-node@@ -194,7 +194,7 @@ EXEMPT_FILES = make_set("web/src/stream_list.js","web/src/stream_muting.js","web/src/stream_popover.js",- "web/src/stream_settings_containers.js",+ "web/src/stream_settings_containers.ts","web/src/stream_settings_ui.js","web/src/stream_ui_updates.js","web/src/submessage.js",diff --git a/web/src/stream_settings_containers.js b/web/src/stream_settings_containers.jsdeleted file mode 100644index e93e8c4c267..00000000000--- a/web/src/stream_settings_containers.js+++ /dev/null@@ -1,9 +0,0 @@-import $ from "jquery";--export function get_edit_container(sub) {- return $(- `#subscription_overlay .subscription_settings[data-stream-id='${CSS.escape(- sub.stream_id,- )}']`,- );-}diff --git a/web/src/stream_settings_containers.ts b/web/src/stream_settings_containers.tsnew file mode 100644index 00000000000..ccd8764028c--- /dev/null+++ b/web/src/stream_settings_containers.ts@@ -0,0 +1,13 @@+import $ from "jquery";+import assert from "minimalistic-assert";++import type {StreamSubscription} from "./sub_store";++export function get_edit_container(sub: StreamSubscription): JQuery {+ assert(sub !== undefined, "Stream subscription is undefined.");+ return $(+ `#subscription_overlay .subscription_settings[data-stream-id='${CSS.escape(+ sub.stream_id.toString(),+ )}']`,+ );+}