Skip to content

Commit aa2ccf8

Browse files
fix(overmind): type with partial base state on transition payload
1 parent 8cb98be commit aa2ccf8

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
@@ -10,7 +10,7 @@ type TStates = {
1010
}
1111

1212
export type StatemachineTransitions<States extends TStates, BaseState extends IState> = {
13-
[State in States["current"]]: Array<States["current"]> | ((payload: Omit<States extends { current: State } ? States : never, 'current'>, state: Statemachine<States, BaseState>) => States["current"] | Array<States["current"]> | boolean)
13+
[State in States["current"]]: Array<States["current"]> | ((payload: Omit<States extends { current: State } ? States & Partial<BaseState> : never, 'current'>, state: Statemachine<States, BaseState>) => States["current"] | Array<States["current"]> | boolean)
1414
}
1515

1616
export interface MachineMethods<States extends TStates, Base extends IState> {

0 commit comments

Comments
 (0)