Added comment for the storage helper instance in EntitiesController

This commit is contained in:
koloml committed 2026-06-21 15:36:14 +04:00
1 parent 9a245ed0f5
commit a6eae657c7
1 file changed
+6
+6
View File
@@ -2,6 +2,12 @@ import StorageHelper, { type StorageChangeSubscriber } from "$lib/browser/Storag
import type StorageEntity from "$lib/extension/base/StorageEntity";
export default class EntitiesController {
/**
* Instance of storage helper used to store/read/subscribe to storage changes.
*
* Mainly exposed for the testing purposes. When class is loaded outside of extension context, will hold `null`
* instead. Any operations of entities will throw an error in this case.
*/
static storage: StorageHelper | null = typeof chrome !== 'undefined'
? new StorageHelper(chrome.storage.local)
: null;