diff --git a/tools/test-js-with-node b/tools/test-js-with-node index 82935c803f..fd6610e031 100755 --- a/tools/test-js-with-node +++ b/tools/test-js-with-node @@ -113,7 +113,7 @@ EXEMPT_FILES = make_set( "web/src/hotkey.js", "web/src/hotspots.js", "web/src/inbox_ui.js", - "web/src/inbox_util.js", + "web/src/inbox_util.ts", "web/src/info_overlay.js", "web/src/integration_url_modal.js", "web/src/invite.ts", diff --git a/web/src/inbox_util.js b/web/src/inbox_util.ts similarity index 82% rename from web/src/inbox_util.js rename to web/src/inbox_util.ts index 24e8b34431..23360a767a 100644 --- a/web/src/inbox_util.js +++ b/web/src/inbox_util.ts @@ -5,15 +5,15 @@ import * as stream_data from "./stream_data"; let is_inbox_visible = false; -export function set_visible(value) { +export function set_visible(value: boolean): void { is_inbox_visible = value; } -export function is_visible() { +export function is_visible(): boolean { return is_inbox_visible; } -export function update_stream_colors() { +export function update_stream_colors(): void { if (!is_visible()) { return; } @@ -21,7 +21,7 @@ export function update_stream_colors() { const $stream_headers = $("#inbox-streams-container .inbox-header"); $stream_headers.each((_index, stream_header) => { const $stream_header = $(stream_header); - const stream_id = Number.parseInt($stream_header.attr("data-stream-id"), 10); + const stream_id = Number.parseInt($stream_header.attr("data-stream-id")!, 10); if (!stream_id) { return; }