measure-x
Version:
A lightweight and efficient **conversion utility** that supports various **number system conversions**, unit conversions, and more. 🚀
23 lines (20 loc) • 662 B
text/typescript
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;