feat(mobx): add persistence

This commit is contained in:
Paul
2021-12-11 16:24:23 +00:00
parent 2b55770ecc
commit bc799931a8
12 changed files with 136 additions and 45 deletions

View File

@@ -1,10 +1,11 @@
import Store from "./Store";
/**
* A data store which is persistent and should cache its data locally.
*/
export default interface Persistent<T> {
export default interface Persistent<T> extends Store {
/**
* Override toJSON to serialise this data store.
* This will also force all subclasses to implement this method.
* Serialise this data store.
*/
toJSON(): unknown;

View File

@@ -0,0 +1,3 @@
export default interface Store {
get id(): string;
}