aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/lib/Store.js
diff options
context:
space:
mode:
authorLibravatar Ricardo Cino <ricardo@cino.io>2022-06-22 00:32:18 +0200
committerLibravatar GitHub <noreply@github.com>2022-06-21 22:32:18 +0000
commit73ba955e344c8ccedd43235495ef8b72b5a2b6fd (patch)
tree03766ab32fefe7e83026a14393527f1dcbaed849 /src/stores/lib/Store.js
parentdocs: add cino as a contributor for infra [skip ci] (#330) (diff)
downloadferdium-app-73ba955e344c8ccedd43235495ef8b72b5a2b6fd.tar.gz
ferdium-app-73ba955e344c8ccedd43235495ef8b72b5a2b6fd.tar.zst
ferdium-app-73ba955e344c8ccedd43235495ef8b72b5a2b6fd.zip
chore: Transform AppStore.js into Typescript (#329)
* turn actions into typescript * correct tsconfig * added TypedStore
Diffstat (limited to 'src/stores/lib/Store.js')
-rw-r--r--src/stores/lib/Store.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/stores/lib/Store.js b/src/stores/lib/Store.js
index a867c3a46..739a47729 100644
--- a/src/stores/lib/Store.js
+++ b/src/stores/lib/Store.js
@@ -2,12 +2,16 @@ import { computed, observable } from 'mobx';
2import Reaction from './Reaction'; 2import Reaction from './Reaction';
3 3
4export default class Store { 4export default class Store {
5 stores = {}; 5 /** @type Stores */
6 stores;
6 7
7 api = {}; 8 /** @type ApiInterface */
9 api;
8 10
9 actions = {}; 11 /** @type Actions */
12 actions;
10 13
14 /** @type Reaction[] */
11 _reactions = []; 15 _reactions = [];
12 16
13 // status implementation 17 // status implementation
@@ -28,8 +32,9 @@ export default class Store {
28 } 32 }
29 33
30 registerReactions(reactions) { 34 registerReactions(reactions) {
31 for (const reaction of reactions) 35 for (const reaction of reactions) {
32 this._reactions.push(new Reaction(reaction)); 36 this._reactions.push(new Reaction(reaction));
37 }
33 } 38 }
34 39
35 setup() {} 40 setup() {}