From 73ba955e344c8ccedd43235495ef8b72b5a2b6fd Mon Sep 17 00:00:00 2001 From: Ricardo Cino Date: Wed, 22 Jun 2022 00:32:18 +0200 Subject: chore: Transform AppStore.js into Typescript (#329) * turn actions into typescript * correct tsconfig * added TypedStore --- src/stores/lib/Store.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/stores/lib/Store.js') 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'; import Reaction from './Reaction'; export default class Store { - stores = {}; + /** @type Stores */ + stores; - api = {}; + /** @type ApiInterface */ + api; - actions = {}; + /** @type Actions */ + actions; + /** @type Reaction[] */ _reactions = []; // status implementation @@ -28,8 +32,9 @@ export default class Store { } registerReactions(reactions) { - for (const reaction of reactions) + for (const reaction of reactions) { this._reactions.push(new Reaction(reaction)); + } } setup() {} -- cgit v1.2.3-70-g09d2