Renamed exported Storage type to TKStorage

To avoid conflict with existing web type
This commit is contained in:
Michaël Lemaire 2019-11-14 18:25:37 +01:00
parent 1db5aabb6a
commit 79f68a6706
1 changed files with 3 additions and 3 deletions

View File

@ -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();
}