diff --git a/tools/test-js-with-node b/tools/test-js-with-node index a3cfc46618..89b1e5c7dc 100755 --- a/tools/test-js-with-node +++ b/tools/test-js-with-node @@ -76,7 +76,7 @@ EXEMPT_FILES = make_set( "web/src/copy_and_paste.js", "web/src/csrf.ts", "web/src/css_variables.js", - "web/src/dark_theme.js", + "web/src/dark_theme.ts", "web/src/debug.ts", "web/src/deprecated_feature_notice.js", "web/src/desktop_integration.js", diff --git a/web/src/dark_theme.js b/web/src/dark_theme.ts similarity index 83% rename from web/src/dark_theme.js rename to web/src/dark_theme.ts index 9b9ef2e942..c92f7e5886 100644 --- a/web/src/dark_theme.js +++ b/web/src/dark_theme.ts @@ -3,7 +3,7 @@ import $ from "jquery"; import {localstorage} from "./localstorage"; import {page_params} from "./page_params"; -export function enable() { +export function enable(): void { $(":root").removeClass("color-scheme-automatic").addClass("dark-theme"); if (page_params.is_spectator) { @@ -12,7 +12,7 @@ export function enable() { } } -export function disable() { +export function disable(): void { $(":root").removeClass("color-scheme-automatic").removeClass("dark-theme"); if (page_params.is_spectator) { @@ -21,6 +21,6 @@ export function disable() { } } -export function default_preference_checker() { +export function default_preference_checker(): void { $(":root").removeClass("dark-theme").addClass("color-scheme-automatic"); }