registerType method

Think registerType(
  1. String type,
  2. Function constructor
)

Registers a custom type for deserialization. When calling {@link Think#fromJSON} this instance is able to pick the correct constructor in order to create custom goals or goal evaluators.

Implementation

Think registerType(String type, Function constructor ) {
	_typesMap[type] = constructor;
	return this;
}