Releases: evanshortiss/tstate-machine
Releases · evanshortiss/tstate-machine
Release list
2.0.1
2.0.0
StateMachineconstructor now expects an options Object, i.esuper(opts).opts.initialTransitionsis required by the super constructor. This replaces$nextrequirement.- Rename
IStateDeclarationtoPartialProperties. - Remove support for individual class fields in favour of a
propscontainer. opts.propsis required by the super constructor. This replacesrememberInitStaterequirement.- Add
PropertiesandValidStatesgenerics, i.eStateMachine<Properties, ValidStates> - Disable
console.errorlogs by default. Can be enabled viaopts.logging. - Make
transitToand others type safe usingValidStatesgeneric. - Return typed errors from
transitTo. These use theTransitionErrortype. - Change signature of
onEntercallbacks to(prevState: string ...args: Array<any>) => void - Change signature of
onLeavecallbacks to(targetState: string) => void - Fix issue #1.