/** * Formats a number with locale-aware thousands separators. * * Uses a fixed 'en-US' locale for deterministic output. Returns '--' for * non-finite values (NaN, Infinity, null, undefined). * * @param value - The number to format (accepts null/undefined) * @returns Formatted string with thousands separators, e.g. "1,234,567" * * @example * formatNumber(1234567) // "1,234,567" * formatNumber(0) // "0" * formatNumber(-42) // "-42" * formatNumber(NaN) // "--" * formatNumber(null) // "--" */ export declare function formatNumber(value: number | null | undefined): string; /** * Formats a number in compact abbreviated form. * * Numbers below 1,000 (in absolute value) are returned as-is with locale formatting. * Larger numbers are abbreviated with K, M, B, or T suffixes with one decimal place. * Returns '--' for non-finite values (NaN, Infinity, null, undefined). * * @param value - The number to format (accepts null/undefined) * @returns Abbreviated string, e.g. "1.2M", "1.5K", "999" * * @example * formatCompact(1234567) // "1.2M" * formatCompact(1500) // "1.5K" * formatCompact(999) // "999" * formatCompact(-2500) // "-2.5K" * formatCompact(0) // "0" * formatCompact(NaN) // "--" */ export declare function formatCompact(value: number | null | undefined): string; /** * Formats a ratio as a percentage string with configurable precision. * * Computes `(numerator / total) * 100` and formats with the specified decimal places. * Returns '--' for non-finite inputs or when total is zero (division by zero). * * @param numerator - The numerator value (accepts null/undefined) * @param total - The total/denominator value (accepts null/undefined) * @param precision - Number of decimal places (default: 1) * @returns Formatted percentage string, e.g. "45.0%" * * @example * formatPercent(45, 100) // "45.0%" * formatPercent(1, 3, 2) // "33.33%" * formatPercent(0, 100) // "0.0%" * formatPercent(45, 0) // "--" * formatPercent(NaN, 100) // "--" */ export declare function formatPercent(numerator: number | null | undefined, total: number | null | undefined, precision?: number): string; /** * Formats a byte count as a human-readable size string. * * Uses binary (IEC) units: KB = 1024, MB = 1024^2, etc. * Returns '--' for non-finite or negative values. Returns "0 B" for zero. * * @param value - The byte count to format (accepts null/undefined) * @returns Human-readable byte string, e.g. "1.0 MB", "512 B" * * @example * formatBytes(1048576) // "1.0 MB" * formatBytes(1536) // "1.5 KB" * formatBytes(500) // "500 B" * formatBytes(0) // "0 B" * formatBytes(-1) // "--" * formatBytes(NaN) // "--" */ export declare function formatBytes(value: number | null | undefined): string;