inbox_util: Convert module to TypeScript.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2023-11-01 23:01:16 -07:00 committed by Tim Abbott
parent 9ed74cbfcd
commit a0656a6c56
2 changed files with 5 additions and 5 deletions

View File

@ -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",

View File

@ -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;
}