registerType method
Registers a custom type for deserialization. When calling {@link StateMachine#fromJSON} the state machine is able to pick the correct constructor in order to create custom states.
Implementation
StateMachine registerType( String type, Function constructor ) {
_typesMap[type] = constructor;
return this;
}