Skip to content

Commit

Permalink
fix(overmind): proper typing of current in statemachine
Browse files Browse the repository at this point in the history
  • Loading branch information
christianalfoni committed Jun 11, 2020
1 parent 22c22ed commit 4ddf1a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/node_modules/overmind/src/statemachine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export type Statemachine<States extends TStates> = States & {
reset: () => void
whenTransitioned: (state: States["state"]) => Promise<void>
} & {
[State in States["state"]]: <O>(entry?: (current: States extends { state: State } ? States : never) => O, exit?: (current: States extends { state: State } ? States : never) => void) => O
[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
}

const CURRENT_EXIT = Symbol('CURRENT_EXIT')
Expand Down

0 comments on commit 4ddf1a4

Please sign in to comment.