BasicUnitsProvider Class @beta
A UnitsProvider backed by the full BIS Units.ecschema.json bundled as a JSON asset.
The bundled JSON is loaded lazily via dynamic import() on the first provider call and cached
at module scope — construction is essentially free, and multiple instances
share the same immutable lookup indexes.
If an initial schema load fails, later provider calls will retry the load instead of pinning the provider into a permanently failed module-level state.
This is the zero-dependency default for backends, tools, and any frontend that doesn't need
iModel overrides. Equivalent to calling createUnitsProvider() with no arguments.
@see createUnitsProvider for layering schema-defined units on top of basic BIS units.
Implements
Methods
| Name | Description | |
|---|---|---|
| constructor(): BasicUnitsProvider | ||
| findUnit(unitLabel: string, schemaName?: string, phenomenon?: string, unitSystem?: string): Promise<UnitProps> | Find a unit by its display label, optionally filtering by schema name, phenomenon, and unit system. | |
| findUnitByName(unitName: string): Promise<UnitProps> | Find a unit by its fully-qualified name (e.g. | |
| getConversion(fromUnit: UnitProps, toUnit: UnitProps): Promise<UnitConversionProps> | Compute the conversion factors from fromUnit to toUnit. |
|
| getUnitsByFamily(phenomenon: string): Promise<UnitProps[]> | Return all units belonging to the given phenomenon (unit family). |
Defined in
Last Updated: 04 June, 2026
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.