TypeOfConverter

Hierarchy

  • TypeOfConverter

Implements

Index

Methods

Methods

convert

convert(reflectedType: tsruntimeTypes.ReflectedType, converter: Converter): Class

Converts reflected utility type to type of class.

Parameters:

NameTypeDescription
reflectedTypetsruntimeTypes.ReflectedTypeReflected type.
converterConverterInstance 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:

NameTypeDescription
reflectedTypetsruntimeTypes.ReflectedTypeReflected type.
converterConverterInstance 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:

NameTypeDescription
reflectedTypetsruntimeTypes.ReflectedTypeReflected type.
converterConverterInstance of converter.

Returns: Record‹keyof any, any›

Returns reflected class properties as instance of an Object pattern.