@planjs/mobx-persist
Version:
enhance-mobx-persist
11 lines (10 loc) • 326 B
TypeScript
/**
* Basic Storage
*/
export default abstract class IStorage {
getItem(key: string): Promise<string | null>;
removeItem(key: string): Promise<void>;
setItem(key: string, value: string): Promise<void>;
clear(): Promise<void>;
onChange?(key: string, newValue: string, oldValue: string): void;
}