File tree Expand file tree Collapse file tree 3 files changed +11
-9
lines changed
packages/node_modules/overmind/src Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ import { IS_PROXY, ProxyStateTree } from 'proxy-state-tree'
44import { Derived } from './derived'
55import { Devtools , Message , safeValue } from './Devtools'
66import {
7- EventType ,
87 Events ,
8+ EventType ,
99 Options ,
1010 ResolveActions ,
1111 ResolveState ,
@@ -63,8 +63,8 @@ export class Overmind<Config extends Configuration> implements BaseApp {
6363 eventHub : EventEmitter < Events >
6464 devtools : Devtools
6565 actions : ResolveActions < Config [ 'actions' ] >
66- state : ResolveState < Config [ 'state' ] >
67- effects : Config [ 'effects' ]
66+ state : ResolveState < Config [ 'state' ] & { } >
67+ effects : Config [ 'effects' ] & { }
6868 constructor ( configuration : Config , options : Options = { } ) {
6969 const name = options . name || 'MyApp'
7070
Original file line number Diff line number Diff line change 1- import { BaseApp , TDerive , TAction , TOperator } from './types'
21import { Mutation } from '../../proxy-state-tree'
2+ import { BaseApp , TAction , TDerive , TOperator } from './types'
33
44export type SubType < Base , Condition > = Pick <
55 Base ,
@@ -135,9 +135,11 @@ type TOperationValue<T> = T extends (
135135 ? ( TContext extends { value : infer TValue } ? TValue : never )
136136 : never
137137
138- type NestedActions = {
139- [ key : string ] : TAction < any , any > | TOperator < any , any > | NestedActions
140- }
138+ type NestedActions =
139+ | {
140+ [ key : string ] : TAction < any , any > | TOperator < any , any > | NestedActions
141+ }
142+ | undefined
141143
142144export type ResolveActions < Actions extends NestedActions > = {
143145 [ T in keyof Actions ] : Actions [ T ] extends TAction < any , any >
Original file line number Diff line number Diff line change @@ -21,10 +21,10 @@ export type BaseApp = {
2121
2222export interface TApp < Config extends Configuration > {
2323 // Resolves `Derive` types in state.
24- state : ResolveState < Config [ 'state' ] >
24+ state : ResolveState < Config [ 'state' ] & { } >
2525 // Transform actions into callable functions.
2626 actions : ResolveActions < Config [ 'actions' ] >
27- effects : [ Config [ 'effects' ] ] extends [ void ] ? { } : Config [ 'effects' ]
27+ effects : Config [ 'effects' ] & { }
2828}
2929
3030export type TContext < App extends BaseApp , Value > = TBaseContext < App > & {
You can’t perform that action at this time.
0 commit comments