aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/stores/index.ts')
-rw-r--r--src/stores/index.ts13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/stores/index.ts b/src/stores/index.ts
index 6ad898d85..a5b1a7452 100644
--- a/src/stores/index.ts
+++ b/src/stores/index.ts
@@ -1,3 +1,7 @@
1import { Stores } from 'src/stores.types';
2import { RouterStore } from 'mobx-react-router';
3import { ApiInterface } from 'src/api';
4import { Actions } from 'src/actions/lib/actions';
1import AppStore from './AppStore'; 5import AppStore from './AppStore';
2import UserStore from './UserStore'; 6import UserStore from './UserStore';
3import FeaturesStore from './FeaturesStore'; 7import FeaturesStore from './FeaturesStore';
@@ -12,8 +16,12 @@ import { workspaceStore } from '../features/workspaces';
12import { communityRecipesStore } from '../features/communityRecipes'; 16import { communityRecipesStore } from '../features/communityRecipes';
13import { todosStore } from '../features/todos'; 17import { todosStore } from '../features/todos';
14 18
15export default (api, actions, router) => { 19export default (
16 const stores = {}; 20 api: ApiInterface,
21 actions: Actions,
22 router: RouterStore,
23): Stores => {
24 const stores: Stores | any = {};
17 Object.assign(stores, { 25 Object.assign(stores, {
18 router, 26 router,
19 app: new AppStore(stores, api, actions), 27 app: new AppStore(stores, api, actions),
@@ -37,5 +45,6 @@ export default (api, actions, router) => {
37 stores[name].initialize(); 45 stores[name].initialize();
38 } 46 }
39 } 47 }
48
40 return stores; 49 return stores;
41}; 50};