getFormatterSpecByQuantityTypeAndSystem Method

Asynchronous Call to get a FormatterSpec for a QuantityType and a Unit System. This formatter spec can be used to synchronously format quantities.

getFormatterSpecByQuantityTypeAndSystem(type: QuantityTypeArg, system?: UnitSystemKey): Promise<undefined | FormatterSpec>

@returns A FormatterSpec Promise.

Parameter Type Description
type QuantityTypeArg One of the built-in quantity types supported.
system UnitSystemKey Requested unit system key. Note it is more efficient to use setActiveUnitSystem to set up formatters for all
quantity types of a unit system.

Returns - Promise<undefined | FormatterSpec>

A FormatterSpec Promise.

Defined in

Last Updated: 16 April, 2024