QuantityTypeDefinition Interface

Beta  

Definition of a standard QuantityType that is registered with the QuantityFormatter.

Methods

Name Description
generateFormatterSpec(formatProps: FormatProps, unitsProvider: UnitsProvider): Promise<FormatterSpec> Generate a [FormatterSpec]$(imodeljs-quantity) that will be called to format values.  
generateParserSpec(formatProps: FormatProps, unitsProvider: UnitsProvider): Promise<ParserSpec> Generate a [ParserSpec]$(imodeljs-quantity) that will be called to parse a string into a quantity value.  
getDefaultFormatPropsBySystem(requestedSystem: UnitSystemKey): FormatProps    

Properties

Name Type Description
description string Localized description that may be used to provide detailed description for the Quantity type.  
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: 29 November, 2022