File tree Expand file tree Collapse file tree 1 file changed +27
-21
lines changed
packages/node_modules/overmind/src Expand file tree Collapse file tree 1 file changed +27
-21
lines changed Original file line number Diff line number Diff line change @@ -131,41 +131,47 @@ export type TConfig<Config extends Configuration> = {
131131 { state : { } }
132132 > [ P ] [ 'state' ]
133133 }
134- : Config [ 'state' ] &
135- {
136- [ P in keyof SubType < Config [ 'modules' ] , { state : { } } > ] : SubType <
137- Config [ 'modules' ] ,
138- { state : { } }
139- > [ P ] [ 'state' ]
140- }
134+ : [ Config [ 'modules' ] ] extends [ undefined ]
135+ ? Config [ 'state' ]
136+ : Config [ 'state' ] &
137+ {
138+ [ P in keyof SubType < Config [ 'modules' ] , { state : { } } > ] : SubType <
139+ Config [ 'modules' ] ,
140+ { state : { } }
141+ > [ P ] [ 'state' ]
142+ }
141143 effects : [ Config [ 'effects' ] ] extends [ undefined ]
142144 ? {
143145 [ P in keyof SubType < Config [ 'modules' ] , { effects : object } > ] : SubType <
144146 Config [ 'modules' ] ,
145147 { effects : object }
146148 > [ P ] [ 'effects' ]
147149 }
148- : Config [ 'effects' ] &
149- {
150- [ P in keyof SubType < Config [ 'modules' ] , { effects : object } > ] : SubType <
151- Config [ 'modules' ] ,
152- { effects : object }
153- > [ P ] [ 'effects' ]
154- }
150+ : [ Config [ 'modules' ] ] extends [ undefined ]
151+ ? Config [ 'effects' ]
152+ : Config [ 'effects' ] &
153+ {
154+ [ P in keyof SubType <
155+ Config [ 'modules' ] ,
156+ { effects : object }
157+ > ] : SubType < Config [ 'modules' ] , { effects : object } > [ P ] [ 'effects' ]
158+ }
155159 actions : [ Config [ 'actions' ] ] extends [ undefined ]
156160 ? {
157161 [ P in keyof SubType < Config [ 'modules' ] , { actions : object } > ] : SubType <
158162 Config [ 'modules' ] ,
159163 { actions : object }
160164 > [ P ] [ 'actions' ]
161165 }
162- : Config [ 'actions' ] &
163- {
164- [ P in keyof SubType < Config [ 'modules' ] , { actions : object } > ] : SubType <
165- Config [ 'modules' ] ,
166- { actions : object }
167- > [ P ] [ 'actions' ]
168- }
166+ : [ Config [ 'modules' ] ] extends [ undefined ]
167+ ? Config [ 'actions' ]
168+ : Config [ 'actions' ] &
169+ {
170+ [ P in keyof SubType <
171+ Config [ 'modules' ] ,
172+ { actions : object }
173+ > ] : SubType < Config [ 'modules' ] , { actions : object } > [ P ] [ 'actions' ]
174+ }
169175 reactions : any
170176 namespaces : any
171177}
You can’t perform that action at this time.
0 commit comments