ObjectConverter

Hierarchy

  • ObjectConverter

Implements

Index

Methods

Methods

convert

convert(reflectedType: ObjectType, converter: Converter): Collection | Interface

Converts reflected type object.

Parameters:

NameTypeDescription
reflectedTypeObjectTypeReflected type.
converterConverterConverter instance.

Returns: Collection | Interface

Returns converted object properties as instance of Collection pattern for object or instance of Interface for interfaces.


isConvertible

isConvertible(reflectedType: tsrTypes.ReflectedType): boolean

Evaluates if provided reflected type is an object(or interface - they are reflected as same kind).

Parameters:

NameTypeDescription
reflectedTypetsrTypes.ReflectedTypeReflected type.

Returns: boolean

Returns true if reflected type is an Object or interface, else false.


isInterface

isInterface(reflectedType: tsrTypes.ReflectedType): boolean

Determines whether reflected type is an interface.

Parameters:

NameTypeDescription
reflectedTypetsrTypes.ReflectedTypeReflected type that will be converted.

Returns: boolean

Returns true if reflected type is interface, else false.


reflect

reflect(reflectedType: ObjectType, converter: Converter): Record‹keyof any, any›

Reflect object type.

Parameters:

NameTypeDescription
reflectedTypeObjectTypeReflected type.
converterConverterConverter instance.

Returns: Record‹keyof any, any›

Returns reflected object properties as instance of an Object.