TypeConverter Class

Type Converter base class.

Extended by

Implements

Methods

Name Description
constructor(): TypeConverter    
convertFromString(_value: string): undefined | ConvertedPrimitives.Value | Promise<undefined | ConvertedPrimitives.Value> Converts a string to a primitive value  
convertFromStringToPropertyValue(value: string, propertyRecord?: PropertyRecord): Promise<PropertyValue> Converts a string with a property record to a property value  
convertFromStringWithOptions(value: string, _options?: { T }): undefined | ConvertedPrimitives.Value | Promise<undefined | ConvertedPrimitives.Value> Default implementation just calls convertFromString with no options  
convertPropertyToString(propertyDescription: PropertyDescription, value?: Value): string | Promise<string> Converts a value associated with a property description to a string  
convertToString(value?: Value): string | Promise<string> Converts a primitive value to a string  
convertToStringWithOptions(value?: Value, _options?: { T }): string | Promise<string> Default implementation just calls convertToString with no options  
isEqualTo(valueA: Value, valueB: Value): boolean Determines if two primitive values are equal  
isNotEqualTo(valueA: Value, valueB: Value): boolean Determines if two primitive values are not equal  
isNotNull(value: Value): boolean Determines if a primitive value is not null or not undefined  
isNull(value: Value): boolean Determines if a primitive value is null or undefined  
sortCompare(valueA: Value, valueB: Value, _ignoreCase?: boolean): number Abstract Sort function for two primitive values  

Properties

Name Type Description
isBooleanType Accessor ReadOnly boolean Determines if the converter is for a boolean type  
isLessGreaterType Accessor ReadOnly boolean Determines if the converter is for a numeric type  
isNullableType Accessor ReadOnly boolean Determines if the converter is for a nullable type  
isStringType Accessor ReadOnly boolean Determines if the converter is for a string type  

Defined in

Last Updated: 21 March, 2024