UNPKG

@fractorysolutions/safe-units

Version:
10 lines (9 loc) 1.03 kB
import { PositiveExponent } from "../exponent"; import { AllowedExponents, DivideUnits, DivisorUnit, ExponentiateUnit, MultiplicandUnit, MultiplyUnits, NthRootUnit, RadicandUnit, Unit, UnitWithSymbols } from "./unitTypeArithmetic"; export declare function dimension<Dim extends string>(dim: Dim, symbol?: string): UnitWithSymbols<{ [D in Dim]: "1"; }>; export declare function multiplyUnits<L extends Unit, R extends MultiplicandUnit<L>>(left: UnitWithSymbols<L>, right: UnitWithSymbols<R>): UnitWithSymbols<MultiplyUnits<L, R>>; export declare function divideUnits<L extends Unit, R extends DivisorUnit<L>>(left: UnitWithSymbols<L>, right: UnitWithSymbols<R>): UnitWithSymbols<DivideUnits<L, R>>; export declare function exponentiateUnit<U extends Unit, N extends AllowedExponents<U>>(unit: UnitWithSymbols<U>, power: N): UnitWithSymbols<ExponentiateUnit<U, N>>; export declare function nthRootUnit<U extends RadicandUnit<N>, N extends PositiveExponent>(unit: UnitWithSymbols<U>, root: N): UnitWithSymbols<NthRootUnit<U, N>>;