QuantityTypeDefinition Interface

This interface supplies the definition of a standard quantity type that is registered with the QuantityFormatter. A standard quantity type could be one of the nine delivered QuantityTypes or a CustomQuantityTypeDefinition.

Properties

Name Type Description
description string Localized description that may be used to provide detailed description for the Quantity type.  
generateFormatterSpec (formatProps: FormatProps, unitsProvider: UnitsProvider) => Promise<FormatterSpec>    
generateParserSpec (formatProps: FormatProps, unitsProvider: UnitsProvider, alternateUnitLabelsProvider?: AlternateUnitLabelsProvider) => Promise<ParserSpec>    
getDefaultFormatPropsBySystem (requestedSystem: UnitSystemKey) => FormatProps    
key Readonly string String used as a key to look up the quantity type.  
label string Localized label to display in UI  
persistenceUnit Readonly UnitProps The unit that the magnitude of the quantity is stored ie.  
type Readonly QuantityTypeArg The type value which can be one of the standard QuantityType enum values or a unique string if defining a custom type.  

Defined in

Last Updated: 16 April, 2024