TypeOfConverter
Hierarchy
- TypeOfConverter
Implements
- TypeConverter
- TypeConverter
Index
Methods
Methods
convert
▸ convert(reflectedType
: tsruntimeTypes.ReflectedType, converter
: Converter): Class
Converts reflected utility type to type of class.
Parameters:
Name | Type | Description |
---|---|---|
reflectedType | tsruntimeTypes.ReflectedType | Reflected type. |
converter | Converter | Instance of converter. |
Returns: Class
Returns converted class type as instance of Class
pattern.
isConvertible
▸ isConvertible(reflectedType
: tsruntimeTypes.ReflectedType, converter
: Converter): boolean
Evaluates if provided reflected type uses utility type $TypeOf
.
Parameters:
Name | Type | Description |
---|---|---|
reflectedType | tsruntimeTypes.ReflectedType | Reflected type. |
converter | Converter | Instance of converter. |
Returns: boolean
Returns true
if reflected type is a utility type $TypeOf
and has valid class type payload, else false
.
reflect
▸ reflect(reflectedType
: tsruntimeTypes.ReflectedType, converter
: Converter): Record‹keyof any, any›
Reflects utility type to properties of class.
Parameters:
Name | Type | Description |
---|---|---|
reflectedType | tsruntimeTypes.ReflectedType | Reflected type. |
converter | Converter | Instance of converter. |
Returns: Record‹keyof any, any›
Returns reflected class properties as instance of an Object
pattern.