mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-04-28 16:20:36 +00:00
feat(mobx): add persistence
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
3
src/mobx/interfaces/Store.ts
Normal file
3
src/mobx/interfaces/Store.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export default interface Store {
|
||||
get id(): string;
|
||||
}
|
||||
Reference in New Issue
Block a user