perform a predefined transition sequence using a named alias
return the current state of the machine
attach a handler that listens to changes in state change handlers receive an object thus:
{
previous: previousState,
current: currentState
}
attach a handler that listens to machine errors error handlers receive an object thus:
{
target: previousState,
current: currentState
}
remove the change handler by reference
remove the error handler by reference
transition the machine state to the target state
wrapper to guarantee new keyword