UnitsProvider Interface
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.
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> | ||
getUnitsByFamily(phenomenon: string): Promise<UnitProps[]> |
Defined in
- quantity/src/Interfaces.ts Line 102
Last Updated: 17 December, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.