ObjectConverter
Hierarchy
- ObjectConverter
Implements
- TypeConverter
- TypeConverter
Index
Methods
Methods
convert
▸ convert(reflectedType
: ObjectType, converter
: Converter): Collection | Interface
Converts reflected type object.
Parameters:
Name | Type | Description |
---|---|---|
reflectedType | ObjectType | Reflected type. |
converter | Converter | Converter 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:
Name | Type | Description |
---|---|---|
reflectedType | tsrTypes.ReflectedType | Reflected 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:
Name | Type | Description |
---|---|---|
reflectedType | tsrTypes.ReflectedType | Reflected 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:
Name | Type | Description |
---|---|---|
reflectedType | ObjectType | Reflected type. |
converter | Converter | Converter instance. |
Returns: Record‹keyof any, any›
Returns reflected object properties as instance of an Object
.