/** * Truncates a string to a specified length and optionally appends an ellipsis. * @param str - The string to truncate. * @param length - The length to truncate to. * @param addEllipsis - Whether to append an ellipsis. Defaults to true. * @returns The truncated string. */ export declare function truncateString(str: string, length: number, addEllipsis?: boolean): string; /** * Truncates a number to a specified number of decimal places. * @param num - The number to truncate. * @param decimals - The number of decimal places to keep. * @returns The truncated number. */ export declare function truncateNumber(num: number, decimals: number): number; /** * Truncates a string or number based on the type and provided length/decimal places. * @param input - The input to truncate (string or number). * @param lengthOrDecimals - The length for strings or number of decimal places for numbers. * @param addEllipsis - Whether to append an ellipsis for strings (optional). * @returns The truncated string or number. */ export declare function truncate(input: string, length: number, addEllipsis?: boolean): string; export declare function truncate(input: number, decimals: number): number;