diff options
Diffstat (limited to 'src/stores/index.ts')
-rw-r--r-- | src/stores/index.ts | 13 |
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 @@ | |||
1 | import { Stores } from 'src/stores.types'; | ||
2 | import { RouterStore } from 'mobx-react-router'; | ||
3 | import { ApiInterface } from 'src/api'; | ||
4 | import { Actions } from 'src/actions/lib/actions'; | ||
1 | import AppStore from './AppStore'; | 5 | import AppStore from './AppStore'; |
2 | import UserStore from './UserStore'; | 6 | import UserStore from './UserStore'; |
3 | import FeaturesStore from './FeaturesStore'; | 7 | import FeaturesStore from './FeaturesStore'; |
@@ -12,8 +16,12 @@ import { workspaceStore } from '../features/workspaces'; | |||
12 | import { communityRecipesStore } from '../features/communityRecipes'; | 16 | import { communityRecipesStore } from '../features/communityRecipes'; |
13 | import { todosStore } from '../features/todos'; | 17 | import { todosStore } from '../features/todos'; |
14 | 18 | ||
15 | export default (api, actions, router) => { | 19 | export 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 | }; |