File tree Expand file tree Collapse file tree 1 file changed +18
-14
lines changed
packages/node_modules/overmind/src Expand file tree Collapse file tree 1 file changed +18
-14
lines changed Original file line number Diff line number Diff line change @@ -72,13 +72,15 @@ export type TState<Config extends Configuration> = [Config['state']] extends [
7272 { state : { } }
7373 > [ P ] [ 'state' ]
7474 }
75- : Config [ 'state' ] &
76- {
77- [ P in keyof SubType < Config [ 'modules' ] , { state : { } } > ] : SubType <
78- Config [ 'modules' ] ,
79- { state : { } }
80- > [ P ] [ 'state' ]
81- }
75+ : [ Config [ 'modules' ] ] extends [ undefined ]
76+ ? Config [ 'state' ]
77+ : Config [ 'state' ] &
78+ {
79+ [ P in keyof SubType < Config [ 'modules' ] , { state : { } } > ] : SubType <
80+ Config [ 'modules' ] ,
81+ { state : { } }
82+ > [ P ] [ 'state' ]
83+ }
8284
8385export type TEffects < Config extends Configuration > = [
8486 Config [ 'effects' ]
@@ -89,13 +91,15 @@ export type TEffects<Config extends Configuration> = [
8991 { effects : object }
9092 > [ P ] [ 'effects' ]
9193 }
92- : Config [ 'effects' ] &
93- {
94- [ P in keyof SubType < Config [ 'modules' ] , { effects : object } > ] : SubType <
95- Config [ 'modules' ] ,
96- { effects : object }
97- > [ P ] [ 'effects' ]
98- }
94+ : [ Config [ 'modules' ] ] extends [ undefined ]
95+ ? Config [ 'effects' ]
96+ : Config [ 'effects' ] &
97+ {
98+ [ P in keyof SubType < Config [ 'modules' ] , { effects : object } > ] : SubType <
99+ Config [ 'modules' ] ,
100+ { effects : object }
101+ > [ P ] [ 'effects' ]
102+ }
99103
100104export type Mutate < Value = any > = ( state : IApp [ 'state' ] , value : Value ) => void
101105
You can’t perform that action at this time.
0 commit comments