Poq.SDK.Node

Home > @poq/transform > TypeConverter > toType

TypeConverter.toType() method

Method transforms plain representation into instance of class/type.

Signature:

toType(transformer: typeof Transformer, item: PlainObj, options?: TransformOptions): InstanceType<Ctor>;

Parameters

Parameter Type Description
transformer typeof Transformer Reference to transformer static class
item PlainObj Plain representation of value to transform into typed one.
options TransformOptions (Optional)

Returns:

InstanceType<Ctor>

Returns instance of class/type.