Skip to content

Commit 4ddf1a4

Browse files
fix(overmind): proper typing of current in statemachine
1 parent 22c22ed commit 4ddf1a4

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
@@ -14,7 +14,7 @@ export type Statemachine<States extends TStates> = States & {
1414
reset: () => void
1515
whenTransitioned: (state: States["state"]) => Promise<void>
1616
} & {
17-
[State in States["state"]]: <O>(entry?: (current: States extends { state: State } ? States : never) => O, exit?: (current: States extends { state: State } ? States : never) => void) => O
17+
[State in States["state"]]: <O>(entry?: (current: Statemachine<States> & (States extends { state: State } ? States : never)) => O, exit?: (current: Statemachine<States> & (States extends { state: State } ? States : never)) => void) => O
1818
}
1919

2020
const CURRENT_EXIT = Symbol('CURRENT_EXIT')

0 commit comments

Comments
 (0)