From cac5778e70ad80ec104c0a0d31a0e2df3f9a9336 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Tue, 10 Oct 2023 17:05:12 -0700 Subject: [PATCH] stream_edit_toggler: Convert module to TypeScript. Signed-off-by: Anders Kaseorg --- tools/test-js-with-node | 2 +- web/src/{stream_edit_toggler.js => stream_edit_toggler.ts} | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename web/src/{stream_edit_toggler.js => stream_edit_toggler.ts} (89%) diff --git a/tools/test-js-with-node b/tools/test-js-with-node index cde1f65838..da2c6136c9 100755 --- a/tools/test-js-with-node +++ b/tools/test-js-with-node @@ -223,7 +223,7 @@ EXEMPT_FILES = make_set( "web/src/stream_create_subscribers.js", "web/src/stream_edit.js", "web/src/stream_edit_subscribers.js", - "web/src/stream_edit_toggler.js", + "web/src/stream_edit_toggler.ts", "web/src/stream_list.js", "web/src/stream_muting.js", "web/src/stream_popover.js", diff --git a/web/src/stream_edit_toggler.js b/web/src/stream_edit_toggler.ts similarity index 89% rename from web/src/stream_edit_toggler.js rename to web/src/stream_edit_toggler.ts index 264b3abdb2..3d336aabaa 100644 --- a/web/src/stream_edit_toggler.js +++ b/web/src/stream_edit_toggler.ts @@ -3,10 +3,10 @@ import $ from "jquery"; import * as components from "./components"; import {$t} from "./i18n"; -export let toggler; +export let toggler: components.Toggle; export let select_tab = "personal_settings"; -export function setup_toggler() { +export function setup_toggler(): void { toggler = components.toggle({ child_wants_focus: true, values: [