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.
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<UnitConversion> | ||
getUnitsByFamily(phenomenon: string): Promise<UnitProps[]> |
Defined in
- quantity/src/Interfaces.ts Line 88
Last Updated: 20 June, 2023