declare function toFormattedNumberString(object: unknown[], options?: import('../types/object').ToFormattedNumberStringOptions): string[]; declare function toFormattedNumberString(object: unknown, options?: import('../types/object').ToFormattedNumberStringOptions): string; /** * 将任意对象转化为格式化的数字字符串 * * 该函数先使用toFormattedNumber将对象转化为数字,再对数字进行字符串格式化 * 支持多种输入类型,包括数字、字符串、布尔值、null、undefined、数组等 * 支持深层数组递归处理 * * @param object - 要格式化的对象,可以是任何类型 * @param options - 格式化选项,具体参数说明见类型声明 * * @returns 格式化后的数字字符串或字符串数组 * - 当传入的 object 为非数组时,返回 string * - 当传入的 object 为数组时,返回 string[] * - 支持深层数组递归处理 * * @example * ```typescript * // 单个数字值 * toFormattedNumberString(123.456); // "123.456" * * // 保留两位小数,不够时补0 * toFormattedNumberString(123.4, { decimalPlaces: 2 }); // "123.40" * * // 带前缀后缀 * toFormattedNumberString(123.456, { prefix: '$', suffix: ' USD' }); // "$123.456 USD" * * // 本地化格式 * toFormattedNumberString(1234567.89, { localized: true }); // "1,234,567.89" * // 兼容旧的useLocalizedFormat参数 * toFormattedNumberString(1234567.89, { useLocalizedFormat: true }); // "1,234,567.89" * * // 自定义NaN和0显示 * toFormattedNumberString(null, { nanValue: 'N/A' }); // "N/A" * toFormattedNumberString(0, { zeroValue: '-' }); // "-" * * // 预处理函数 * toFormattedNumberString(0.1234, { * preProcessor: (original, num) => num * 100, * suffix: '%' * }); // "12.34%" * * // 函数类型前缀 * toFormattedNumberString(123.456, { * prefix: (original, num, formatted) => `$${Math.floor(num)}` * }); // "$123123.456" * * // 函数类型后缀 * toFormattedNumberString(123.456, { * suffix: (original, num, formatted) => `/${num.toFixed(0)}` * }); // "123.456/123" * * // 处理数组 * toFormattedNumberString([123.456, '789.012'], { decimalPlaces: 2 }); // ["123.46", "789.01"] * * // 处理深层数组 * toFormattedNumberString([[1, '1.23'], ['45.67', [89.01, 'abc']]], { decimalPlaces: 2 }); * // 返回: [["1.00", "1.23"], ["45.67", ["89.01", "NaN"]]] * ``` */ export default toFormattedNumberString; //# sourceMappingURL=toFormattedNumberString.d.ts.map