From 2d71e61e46394d75d9f52ba1f4c273ed6d3c9cfd Mon Sep 17 00:00:00 2001 From: Ricardo Cino Date: Fri, 24 Jun 2022 21:25:05 +0200 Subject: chore: convert the last few stores to typescript --- src/stores/lib/Store.js | 54 ------------------------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 src/stores/lib/Store.js (limited to 'src/stores/lib') diff --git a/src/stores/lib/Store.js b/src/stores/lib/Store.js deleted file mode 100644 index 739a47729..000000000 --- a/src/stores/lib/Store.js +++ /dev/null @@ -1,54 +0,0 @@ -import { computed, observable } from 'mobx'; -import Reaction from './Reaction'; - -export default class Store { - /** @type Stores */ - stores; - - /** @type ApiInterface */ - api; - - /** @type Actions */ - actions; - - /** @type Reaction[] */ - _reactions = []; - - // status implementation - @observable _status = null; - - @computed get actionStatus() { - return this._status || []; - } - - set actionStatus(status) { - this._status = status; - } - - constructor(stores, api, actions) { - this.stores = stores; - this.api = api; - this.actions = actions; - } - - registerReactions(reactions) { - for (const reaction of reactions) { - this._reactions.push(new Reaction(reaction)); - } - } - - setup() {} - - initialize() { - this.setup(); - for (const reaction of this._reactions) reaction.start(); - } - - teardown() { - for (const reaction of this._reactions) reaction.stop(); - } - - resetStatus() { - this._status = null; - } -} -- cgit v1.2.3-54-g00ecf