We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 610ed57 commit 4246935Copy full SHA for 4246935
packages/node_modules/overmind/src/statemachine.ts
@@ -1,7 +1,5 @@
1
import { PROXY_TREE, VALUE } from 'proxy-state-tree'
2
3
-import { Derive } from './'
4
-
5
export type StatemachineDefinition<States extends string> = {
6
initial: States,
7
states: {
@@ -13,7 +11,7 @@ export type Statemachine<States extends string> = {
13
11
current: States
14
12
reset: () => void
15
} & {
16
- [State in States]: <T>(entry?: () => T, exit?: () => void) => T
+ [State in States]: <T extends () => any>(entry?: T, exit?: () => void) => T extends () => infer U ? U : void
17
}
18
19
const CURRENT_EXIT = Symbol('CURRENT_EXIT')
0 commit comments