UnitsProvider Interface @beta
This interface is implemented by the class that is responsible for locating units by name or label and providing conversion values between units. The methods to be implemented are async allowing the UnitsProvider to query the backend when necessary to look up unit definition and conversion rules.
Implemented by
Methods
| Name | Description | |
|---|---|---|
| findUnit(unitLabel: string, schemaName?: string, phenomenon?: string, unitSystem?: string): Promise<UnitProps> | ||
| findUnitByName(unitName: string): Promise<UnitProps> | ||
| getConversion(fromUnit: UnitProps, toUnit: UnitProps): Promise<UnitConversionProps> | Compute the conversion factors from fromUnit to toUnit. |
|
| getUnitsByFamily(phenomenon: string): Promise<UnitProps[]> |
Defined in
- quantity/src/Interfaces.ts Line 109
Last Updated: 05 May, 2026
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.