File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
packages/node_modules/overmind/src Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,6 @@ export type ResolveActions<Actions extends { [key: string]: any }> = {
106106 : {
107107 [ P in keyof Actions [ T ] ] : Actions [ T ] [ P ] extends Function
108108 ? ReturnType < Actions [ T ] [ P ] >
109- : undefined
109+ : Actions [ T ] [ P ]
110110 }
111111}
Original file line number Diff line number Diff line change @@ -24,9 +24,12 @@ export interface TApp<Config extends Configuration> {
2424 state : ResolveState < Config [ 'state' ] & { } >
2525 // Transform actions into callable functions.
2626 actions : ResolveActions < Config [ 'actions' ] & { } >
27- effects : Config [ 'effects' ] & { }
27+ effects : [ Config [ 'effects' ] ] extends [ void ] ? { } : Config [ 'effects' ] & { }
2828}
2929
30+ // type CheckEffects = TApp<{}>['effects'] // => should produce {}
31+ // type CheckActions = TApp<{}>['actions'] // => should produce {}
32+
3033export type TContext < App extends BaseApp , Value > = TBaseContext < App > & {
3134 value : Value
3235}
You can’t perform that action at this time.
0 commit comments