- Method cast
Value cast callback.
Type to cast to.
Expected to return the object value-casted (converted) to the type described by
The argument is currently a string with the name of the type, but might in the future be a value of the type type.
Currently casting between object types is a noop.
If the returned value is not deemed to be of the requested type a runtime error may be thrown.
It's assumed that this function is side-effect free.