From e73bbc03ba9301d55580812ad2ee4e48e8896027 Mon Sep 17 00:00:00 2001 From: PalmDevs Date: Tue, 28 Jul 2026 12:44:31 +0700 Subject: [PATCH] fix(lib/json-storage): clarify how `JsonStorage.get()` and `JsonStorageUpdateMode.Load` works --- lib/json-storage/src/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/json-storage/src/index.ts b/lib/json-storage/src/index.ts index 2d0e1f8..d086da3 100644 --- a/lib/json-storage/src/index.ts +++ b/lib/json-storage/src/index.ts @@ -34,7 +34,8 @@ export const JsonStorageUpdateMode = { */ Replace: 1, /** - * Same behavior as {@link JsonStorageUpdateMode.Replace}, but for the intial load of the storage. + * Same behavior as {@link JsonStorageUpdateMode.Replace}, but for when the storage is being synced from disk. + * E.g. on initial load, or when the storage file is deleted and recreated. */ Load: 2, } as const @@ -221,7 +222,8 @@ export interface JsonStorage { */ subscribe(callback: JsonStorageSubscription): () => void /** - * Get the storage. + * Reads the storage from disk. + * If the storage does not exist, it will be created with the default value. */ get(): Promise /**