chore(mobx): refactor into interfaces

This commit is contained in:
Paul
2021-12-11 14:36:26 +00:00
parent a8491267a4
commit 2b55770ecc
7 changed files with 6 additions and 6 deletions

View File

@@ -0,0 +1,16 @@
/**
* A data store which is persistent and should cache its data locally.
*/
export default interface Persistent<T> {
/**
* Override toJSON to serialise this data store.
* This will also force all subclasses to implement this method.
*/
toJSON(): unknown;
/**
* Hydrate this data store using given data.
* @param data Given data
*/
hydrate(data: T): void;
}