ReferenceConverter

Hierarchy

  • ReferenceConverter

Implements

Index

Methods

Methods

convert

convert(reflectedType: ReferenceType, converter: Converter): any

Converts reflected type reference.

Parameters:

NameTypeDescription
reflectedTypeReferenceTypeReflected type.
converterConverterConverter 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:

NameTypeDescription
reflectedTypetsruntimeTypes.ReflectedTypeReflected type.

Returns: boolean

Returns true if type is referenced, else false.


reflect

reflect(reflectedType: ReferenceType, converter: Converter): any

Reflects reference type.

Parameters:

NameTypeDescription
reflectedTypeReferenceTypeReflected type.
converterConverterConverter instance.

Returns: any

Returns reflected reference type as any referenced value.