Releases
2.0.0
Compare
Sorry, something went wrong.
No results found
StateMachine constructor now expects an options Object, i.e super(opts).
opts.initialTransitions is required by the super constructor. This replaces $next requirement.
Rename IStateDeclaration to PartialProperties.
Remove support for individual class fields in favour of a props container.
opts.props is required by the super constructor. This replaces rememberInitState requirement.
Add Properties and ValidStates generics, i.e StateMachine<Properties, ValidStates>
Disable console.error logs by default. Can be enabled via opts.logging.
Make transitTo and others type safe using ValidStates generic.
Return typed errors from transitTo. These use the TransitionError type.
Change signature of onEnter callbacks to (prevState: string ...args: Array<any>) => void
Change signature of onLeave callbacks to (targetState: string) => void
Fix issue #1 .
You can’t perform that action at this time.