From 325b308ed5acb18f901ca6838008667f159b8bb1 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 10 Oct 2023 13:20:31 -0700 Subject: [PATCH] about_zulip: Convert module to TypeScript. Signed-off-by: Anders Kaseorg --- tools/test-js-with-node | 2 +- web/src/{about_zulip.js => about_zulip.ts} | 4 ++-- web/src/copied_tooltip.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename web/src/{about_zulip.js => about_zulip.ts} (93%) diff --git a/tools/test-js-with-node b/tools/test-js-with-node index 00209fd366..2da6eafff9 100755 --- a/tools/test-js-with-node +++ b/tools/test-js-with-node @@ -45,7 +45,7 @@ def make_set(files: List[str]) -> Set[str]: EXEMPT_FILES = make_set( [ "web/shared/src/poll_data.ts", - "web/src/about_zulip.js", + "web/src/about_zulip.ts", "web/src/add_stream_options_popover.js", "web/src/add_subscribers_pill.js", "web/src/admin.js", diff --git a/web/src/about_zulip.js b/web/src/about_zulip.ts similarity index 93% rename from web/src/about_zulip.js rename to web/src/about_zulip.ts index 0fd2e75d5b..e55b5bd713 100644 --- a/web/src/about_zulip.js +++ b/web/src/about_zulip.ts @@ -8,7 +8,7 @@ import {show_copied_confirmation} from "./copied_tooltip"; import * as overlays from "./overlays"; import {page_params} from "./page_params"; -export function launch() { +export function launch(): void { overlays.open_overlay({ name: "about-zulip", $overlay: $("#about-zulip"), @@ -24,7 +24,7 @@ export function launch() { }); } -export function initialize() { +export function initialize(): void { const rendered_about_zulip = render_about_zulip({ zulip_version: page_params.zulip_version, zulip_merge_base: page_params.zulip_merge_base, diff --git a/web/src/copied_tooltip.ts b/web/src/copied_tooltip.ts index 84af71525f..3869386fd9 100644 --- a/web/src/copied_tooltip.ts +++ b/web/src/copied_tooltip.ts @@ -4,7 +4,7 @@ import {$t} from "./i18n"; export function show_copied_confirmation( copy_button: HTMLElement, - on_hide_callback: () => void, + on_hide_callback?: () => void, timeout_in_ms = 1000, ): void { // Display a tooltip to notify the user the message or code was copied.