-
Notifications
You must be signed in to change notification settings - Fork 307
Open
Description
Hi all,
I'm trying to implement convert-units in an Electron preload script (basically, shared code between main and renderer threads) and I'm getting the following error:
TypeError: configureMeasurements is not a function
The doc says configureMeasurements but I see configMeasurements in the code so I'm a but confused here. And nether of them work. Same error.
Intellisense doesn't auto-complete anothing when I start typing conf and @types/convert-units seems out of sync (types 2.3.9 vs repo 2.3.3) with the repo so I removed it before upgrading to 3.0.0-beta6.
import configureMeasurements, { Converter } from 'convert-units'
import allMeasures, {
AllMeasures,
AllMeasuresSystems,
AllMeasuresUnits
} from 'convert-units/definitions/all'
function convert(value: number): Converter<AllMeasures, AllMeasuresSystems, AllMeasuresUnits> {
return configureMeasurements<AllMeasures, AllMeasuresSystems, AllMeasuresUnits>(allMeasures)(value)
}Thanks!
Metadata
Metadata
Assignees
Labels
No labels