From d1a69437d1cf5bec044f291e03d44df8492a4f01 Mon Sep 17 00:00:00 2001 From: KoloMl Date: Sun, 16 Feb 2025 15:59:13 +0400 Subject: [PATCH] Converting debug store to TS --- src/stores/debug.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/stores/debug.ts b/src/stores/debug.ts index 1fd7da9..14630ef 100644 --- a/src/stores/debug.ts +++ b/src/stores/debug.ts @@ -1,12 +1,15 @@ -import { writable } from "svelte/store"; +import { type Writable, writable } from "svelte/store"; + +// todo: Maybe this could be dynamically resolved using map of entities and not currently existing list of all settings +// classes. For now it's just generic record. +type StorageContents = Record; /** * This is readable version of storages. Any changes made to these objects will not be sent to the local storage. - * @type {Writable>} */ -export const storagesCollection = writable({}); +export const storagesCollection: Writable = writable({}); -chrome.storage.local.get(storages => { +void chrome.storage.local.get(null, storages => { storagesCollection.set(storages); });