Skip to content

Commit 604a20d

Browse files
fix(overmind): more type fixing
1 parent 198981a commit 604a20d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/node_modules/overmind/src/statemachine.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export interface MachineMethods<States extends TState, Events extends TEvents, B
3232
): Statemachine<States, Events, BaseState>
3333
}
3434

35-
export type Statemachine<States extends TState, Events extends TEvents, BaseState extends TBaseState = never> = States & BaseState & MachineMethods<States, Events, BaseState>
35+
export type Statemachine<States extends TState, Events extends TEvents, BaseState extends TBaseState = never> = [BaseState] extends [never] ? States & MachineMethods<States, Events, BaseState> : States & BaseState & MachineMethods<States, Events, BaseState>
3636

3737
const INITIAL_STATE = Symbol('INITIAL_STATE')
3838
const TRANSITIONS = Symbol('TRANSITIONS')

0 commit comments

Comments
 (0)