import type { MeasureKind } from "../conversions/types.js"; import type { BestUnitsForMeasure } from "../types/units.js"; import type { LiteralToPrimitive } from "../types/utils.js"; /** * Convert a given duration of milliseconds to a string that best represents it. * * If you are very concerned about performance you should use the {@link convertMany} function directly. * * @example * ```ts * ms(-3 * 60000); // '-3min' * ``` * * @param quantity - Duration of milliseconds to convert * * @returns A duration string * * @public */ export declare function ms(quantity: Q): `${LiteralToPrimitive}${BestUnitsForMeasure}`; /** * Convert a duration string to a duration in milliseconds. * * If you are very concerned about performance you should use the {@link convertMany} function directly. * * @example * ```ts * ms('1d 2h 30min'); // 95400000 * ``` * * @param value - Duration string to convert * * @returns A duration in milliseconds * * @public */ export declare function ms(value: string): number;