ReferenceConverter
Hierarchy
- ReferenceConverter
Implements
- TypeConverter
- TypeConverter
Index
Methods
Methods
convert
▸ convert(reflectedType
: ReferenceType, converter
: Converter): any
Converts reflected type reference.
Parameters:
Name | Type | Description |
---|---|---|
reflectedType | ReferenceType | Reflected type. |
converter | Converter | Converter instance. |
Returns: any
Returns converted reflected type reference as the referenced value, constructor function wrapped in InstanceOf
pattern, array wrapped in List
pattern.
isConvertible
▸ isConvertible(reflectedType
: tsruntimeTypes.ReflectedType): boolean
Evaluates if provided reflected type is referenced(examples: reference to Class, constructor Function(RegExp))
Parameters:
Name | Type | Description |
---|---|---|
reflectedType | tsruntimeTypes.ReflectedType | Reflected type. |
Returns: boolean
Returns true
if type is referenced, else false
.
reflect
▸ reflect(reflectedType
: ReferenceType, converter
: Converter): any
Reflects reference type.
Parameters:
Name | Type | Description |
---|---|---|
reflectedType | ReferenceType | Reflected type. |
converter | Converter | Converter instance. |
Returns: any
Returns reflected reference type as any referenced value.