From 7ac39eedc4ed62954c5913649faa54e61de4dbe5 Mon Sep 17 00:00:00 2001 From: Junhao Liao Date: Sat, 28 Dec 2024 22:52:27 -0500 Subject: [PATCH] Refactor LOCAL_STORAGE_KEY to use TypeScript enum. --- .../client/src/typings/LOCAL_STORAGE_KEY.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/components/log-viewer-webui/client/src/typings/LOCAL_STORAGE_KEY.ts b/components/log-viewer-webui/client/src/typings/LOCAL_STORAGE_KEY.ts index 3218b9f48..d57d0a534 100644 --- a/components/log-viewer-webui/client/src/typings/LOCAL_STORAGE_KEY.ts +++ b/components/log-viewer-webui/client/src/typings/LOCAL_STORAGE_KEY.ts @@ -1,8 +1,5 @@ -/** - * Enum of `window.localStorage` keys. - */ -const LOCAL_STORAGE_KEY = Object.freeze({ - THEME: "theme", -}); +enum LOCAL_STORAGE_KEY { + THEME = "theme", +} export default LOCAL_STORAGE_KEY;