type MassSymbol = typeof massSymbols[number]; /** * Type predicate. * @param candidate The candidate to test. */ declare function isMassSymbol(candidate: any): candidate is MassSymbol; /** * All the Mass symbols. */ declare const massSymbols: readonly ["kg", "g", "dg", "cg", "mg", "µg", "ng", "pg", "oz", "lb", "st", "t", "ton", "ct", "oz t", "slug"]; /** * The object representation of a measurement. * * @template Unit The type of the unit of measurement. * @template Value The type of the value of the measurement. */ type Measurement$1 = Number & { readonly value: Value; readonly unit: Unit; }; /** * Represents a dimension measurement. * @template Units - The units of the dimension. */ type Measurement = Measurement$1 & Alternatives; /** * Represents a collection of alternative measurements for different units. * * @template Units - The string literal type representing the available units. */ type Alternatives = { readonly [unit in Units]: Measurement; }; /** * A dimension is a map of units to creation functions. * Each function takes a number value and returns a * dimension measurement. * @template Units - The units of the dimension. */ type Dimension = { readonly [unit in Units]: (value: number) => Measurement; }; type Mass = Measurement; declare const mass: Dimension<"kg" | "g" | "dg" | "cg" | "mg" | "µg" | "ng" | "pg" | "oz" | "lb" | "st" | "t" | "ton" | "ct" | "oz t" | "slug">; declare const kilograms: (value: number) => Measurement<"kg" | "g" | "dg" | "cg" | "mg" | "µg" | "ng" | "pg" | "oz" | "lb" | "st" | "t" | "ton" | "ct" | "oz t" | "slug">; declare const grams: (value: number) => Measurement<"kg" | "g" | "dg" | "cg" | "mg" | "µg" | "ng" | "pg" | "oz" | "lb" | "st" | "t" | "ton" | "ct" | "oz t" | "slug">; declare const decigrams: (value: number) => Measurement<"kg" | "g" | "dg" | "cg" | "mg" | "µg" | "ng" | "pg" | "oz" | "lb" | "st" | "t" | "ton" | "ct" | "oz t" | "slug">; declare const centigrams: (value: number) => Measurement<"kg" | "g" | "dg" | "cg" | "mg" | "µg" | "ng" | "pg" | "oz" | "lb" | "st" | "t" | "ton" | "ct" | "oz t" | "slug">; declare const milligrams: (value: number) => Measurement<"kg" | "g" | "dg" | "cg" | "mg" | "µg" | "ng" | "pg" | "oz" | "lb" | "st" | "t" | "ton" | "ct" | "oz t" | "slug">; declare const micrograms: (value: number) => Measurement<"kg" | "g" | "dg" | "cg" | "mg" | "µg" | "ng" | "pg" | "oz" | "lb" | "st" | "t" | "ton" | "ct" | "oz t" | "slug">; declare const nanograms: (value: number) => Measurement<"kg" | "g" | "dg" | "cg" | "mg" | "µg" | "ng" | "pg" | "oz" | "lb" | "st" | "t" | "ton" | "ct" | "oz t" | "slug">; declare const picograms: (value: number) => Measurement<"kg" | "g" | "dg" | "cg" | "mg" | "µg" | "ng" | "pg" | "oz" | "lb" | "st" | "t" | "ton" | "ct" | "oz t" | "slug">; declare const ounces: (value: number) => Measurement<"kg" | "g" | "dg" | "cg" | "mg" | "µg" | "ng" | "pg" | "oz" | "lb" | "st" | "t" | "ton" | "ct" | "oz t" | "slug">; declare const pounds: (value: number) => Measurement<"kg" | "g" | "dg" | "cg" | "mg" | "µg" | "ng" | "pg" | "oz" | "lb" | "st" | "t" | "ton" | "ct" | "oz t" | "slug">; declare const stones: (value: number) => Measurement<"kg" | "g" | "dg" | "cg" | "mg" | "µg" | "ng" | "pg" | "oz" | "lb" | "st" | "t" | "ton" | "ct" | "oz t" | "slug">; declare const metricTons: (value: number) => Measurement<"kg" | "g" | "dg" | "cg" | "mg" | "µg" | "ng" | "pg" | "oz" | "lb" | "st" | "t" | "ton" | "ct" | "oz t" | "slug">; declare const shortTons: (value: number) => Measurement<"kg" | "g" | "dg" | "cg" | "mg" | "µg" | "ng" | "pg" | "oz" | "lb" | "st" | "t" | "ton" | "ct" | "oz t" | "slug">; declare const carats: (value: number) => Measurement<"kg" | "g" | "dg" | "cg" | "mg" | "µg" | "ng" | "pg" | "oz" | "lb" | "st" | "t" | "ton" | "ct" | "oz t" | "slug">; declare const ouncesTroy: (value: number) => Measurement<"kg" | "g" | "dg" | "cg" | "mg" | "µg" | "ng" | "pg" | "oz" | "lb" | "st" | "t" | "ton" | "ct" | "oz t" | "slug">; declare const slugs: (value: number) => Measurement<"kg" | "g" | "dg" | "cg" | "mg" | "µg" | "ng" | "pg" | "oz" | "lb" | "st" | "t" | "ton" | "ct" | "oz t" | "slug">; export { carats, centigrams, decigrams, grams, isMassSymbol, kilograms, mass, massSymbols, metricTons, micrograms, milligrams, nanograms, ounces, ouncesTroy, picograms, pounds, shortTons, slugs, stones }; export type { Mass, MassSymbol };