UNPKG

measure-x

Version:

A lightweight and efficient **conversion utility** that supports various **number system conversions**, unit conversions, and more. 🚀

14 lines (13 loc) • 650 B
import { AngleUnit } from "../converters/angle/types"; import { AreaUnit } from "../converters/area/types"; import { LengthUnit } from "../converters/length/types"; import { TemperatureUnit } from "../converters/temperature/types"; import { TimeUnit } from "../converters/time/types"; import { VolumeUnit } from "../converters/volume/types"; import { WeightUnit } from "../converters/weigth/type"; export interface Converter { category: string; units: string[]; convert: (value: number, from: string, to: string) => number; } export type AnyUnit = LengthUnit | TemperatureUnit | TimeUnit | WeightUnit | AreaUnit | VolumeUnit | AngleUnit;