diff --git a/src/index.ts b/src/index.ts index 268aea8..6cf2e40 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,12 +5,12 @@ import { NodeDirectoryStorage } from "./node"; /** * Base type for storage usage */ -export type Storage = KeyValueStorage +export type TKStorage = KeyValueStorage /** * Get the best "local" storage available */ -export function getLocalStorage(appname: string): Storage { +export function getLocalStorage(appname: string): TKStorage { try { return new ScopedStorage(new BrowserLocalStorage(), appname); } catch { @@ -26,6 +26,6 @@ export function getLocalStorage(appname: string): Storage { /** * Get a in-memory volatile storage */ -export function getMemoryStorage(): Storage { +export function getMemoryStorage(): TKStorage { return new MemoryStorage(); }