Renamed exported Storage type to TKStorage
To avoid conflict with existing web type
This commit is contained in:
parent
1db5aabb6a
commit
79f68a6706
|
@ -5,12 +5,12 @@ import { NodeDirectoryStorage } from "./node";
|
||||||
/**
|
/**
|
||||||
* Base type for storage usage
|
* Base type for storage usage
|
||||||
*/
|
*/
|
||||||
export type Storage = KeyValueStorage
|
export type TKStorage = KeyValueStorage
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the best "local" storage available
|
* Get the best "local" storage available
|
||||||
*/
|
*/
|
||||||
export function getLocalStorage(appname: string): Storage {
|
export function getLocalStorage(appname: string): TKStorage {
|
||||||
try {
|
try {
|
||||||
return new ScopedStorage(new BrowserLocalStorage(), appname);
|
return new ScopedStorage(new BrowserLocalStorage(), appname);
|
||||||
} catch {
|
} catch {
|
||||||
|
@ -26,6 +26,6 @@ export function getLocalStorage(appname: string): Storage {
|
||||||
/**
|
/**
|
||||||
* Get a in-memory volatile storage
|
* Get a in-memory volatile storage
|
||||||
*/
|
*/
|
||||||
export function getMemoryStorage(): Storage {
|
export function getMemoryStorage(): TKStorage {
|
||||||
return new MemoryStorage();
|
return new MemoryStorage();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue