1
0
mirror of https://github.com/koloml/furbooru-tagging-assistant.git synced 2025-12-24 07:12:57 +00:00

Converting debug store to TS

This commit is contained in:
2025-02-16 15:59:13 +04:00
parent 062b04ca8a
commit d1a69437d1

View File

@@ -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<string, any>;
/**
* This is readable version of storages. Any changes made to these objects will not be sent to the local storage.
* @type {Writable<Record<string, Object>>}
*/
export const storagesCollection = writable({});
export const storagesCollection: Writable<StorageContents> = writable({});
chrome.storage.local.get(storages => {
void chrome.storage.local.get<StorageContents>(null, storages => {
storagesCollection.set(storages);
});