File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed
packages/node_modules/overmind/src Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change 11import { Configuration } from './'
2- import { ResolveState , ResolveActions } from './internalTypes'
32
4- interface ConfigurationWithModules extends Configuration {
3+ interface ModulesConfiguration {
54 [ namespace : string ] : {
65 onInitialize ?: any
76 state ?: { }
@@ -32,7 +31,7 @@ function parseModule(
3231 }
3332}
3433
35- export function modules < T extends ConfigurationWithModules > (
34+ export function modules < T extends ModulesConfiguration > (
3635 modules : T
3736) : {
3837 onInitialize ?: any
@@ -42,13 +41,9 @@ export function modules<T extends ConfigurationWithModules>(
4241} {
4342 const result : any = {
4443 initializers : [ ] ,
45- actions : modules . actions || { } ,
46- effects : modules . effects || { } ,
47- state : modules . state || { } ,
48- }
49-
50- if ( modules . onInitialize ) {
51- result . initializers . push ( modules . onInitialize )
44+ actions : { } ,
45+ effects : { } ,
46+ state : { } ,
5247 }
5348
5449 Object . keys ( modules ) . forEach ( ( modName ) => {
You can’t perform that action at this time.
0 commit comments