/** * Converts a value to a `rem` unit with optional scaling. * @param {unknown} value - The value to convert. Can be a number, string, or other types. * @returns {string} The converted value in `rem` units. */ declare const rem: (value: unknown) => string; /** * Converts a value to an `em` unit. * @param {unknown} value - The value to convert. Can be a number, string, or other types. * @returns {string} The converted value in `em` units. */ declare const em: (value: unknown) => string; /** * Converts a value to a pixel (`px`) unit or returns the original value if it cannot be converted. * @param {unknown} value - The value to convert. Can be a number, string, or other types. * @returns {string | number} The converted value in `px` units, or `NaN` if conversion fails. * @example * px(16); // 16 * px('1rem'); // 16 * px('calc(100% - 50px)'); // 'calc(100% - 50px)' */ declare function px(value: unknown): string | number; /** * Creates a converter function for a specific unit (e.g., `rem`, `em`). * @param units - The target unit for conversion (e.g., `rem`, `em`). * @param [options] - Options for the converter. * @param [options.shouldScale=false] - Whether to scale the value during conversion. * @returns `(value: unknown) => string` - A function that converts a value to the specified unit. * @example * const remConverter = createConverter('rem', { shouldScale: true }); * remConverter(16); // '1rem' */ declare function createConverter(units: string, { shouldScale }?: { shouldScale?: boolean | undefined; }): (value: unknown) => string; export { createConverter, px, rem, em };