Skip to content

This site describes solve-engine as it is on main: 2.43.0, which npm does not have yet. npm installs 2.40.0, so a page may show an answer that version does not give yet.

canConvert

function canConvert(from, to): boolean;

Defined in: packages/engine/src/uom/UomConverter.ts:107

Check whether from can be converted to to. Same unit, or same measure kind (length, mass, …) and the underlying tables accept the pair. Never throws; returns false on any failure.

ParameterType
fromstring
tostring

boolean