Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
ts: Convert `deprecated_feature_notice` module to TypeScript.
Lalita2db6df82693
diff --git a/tools/test-js-with-node b/tools/test-js-with-nodeindex 1a9d7b83a20..96085b18f06 100755--- a/tools/test-js-with-node+++ b/tools/test-js-with-node@@ -78,7 +78,7 @@ EXEMPT_FILES = make_set("web/src/css_variables.js","web/src/dark_theme.ts","web/src/debug.ts",- "web/src/deprecated_feature_notice.js",+ "web/src/deprecated_feature_notice.ts","web/src/desktop_integration.js","web/src/dialog_widget.ts","web/src/drafts.js",diff --git a/web/src/deprecated_feature_notice.js b/web/src/deprecated_feature_notice.tssimilarity index 88%rename from web/src/deprecated_feature_notice.jsrename to web/src/deprecated_feature_notice.tsindex ec46503f3b8..b1ef69f99ce 100644--- a/web/src/deprecated_feature_notice.js+++ b/web/src/deprecated_feature_notice.ts@@ -6,7 +6,10 @@ import * as dialog_widget from "./dialog_widget";import {$t_html} from "./i18n";import {localstorage} from "./localstorage";-export function get_hotkey_deprecation_notice(originalHotkey, replacementHotkey) {+export function get_hotkey_deprecation_notice(+ originalHotkey: string,+ replacementHotkey: string,+): string {return $t_html({defaultMessage:@@ -16,9 +19,9 @@ export function get_hotkey_deprecation_notice(originalHotkey, replacementHotkey));}-let shown_deprecation_notices = [];+let shown_deprecation_notices: string[] = [];-export function maybe_show_deprecation_notice(key) {+export function maybe_show_deprecation_notice(key: string): void {let message;const isCmdOrCtrl = common.has_mac_keyboard() ? "Cmd" : "Ctrl";switch (key) {@@ -56,7 +59,9 @@ export function maybe_show_deprecation_notice(key) {html_heading: $t_html({defaultMessage: "Deprecation notice"}),html_body: message,html_submit_button: $t_html({defaultMessage: "Got it"}),- on_click() {},+ on_click() {+ return;+ },close_on_submit: true,focus_submit_on_open: true,single_footer_button: true,