/** * 百分比格式化选项 */ export interface PercentFormatOptions { /** 是否显示百分号 */ showPercentSymbol: boolean; /** 小数精度 */ precision: number; /** 百分比范围 */ range: [number, number]; } /** * 格式化百分比数值 * * @param value 数值 * @param options 格式化选项 * @returns 格式化后的百分比字符串 * * @example * formatPercent(85.5, { showPercentSymbol: true, precision: 1, range: [0, 100] }) * // 返回: '85.5%' * * @example * formatPercent(0.855, { showPercentSymbol: true, precision: 1, range: [0, 1] }) * // 返回: '85.5%' */ export declare function formatPercent(value: number | null | undefined, options: PercentFormatOptions): string | null;