export interface Amount { amount: number; currency: string; } declare const /** * Determine if a constant or a variable is an amount. * @param {object} potentialAmount Potential amount. * @returns {boolean} Whether the potential amount is a valid amount object with amount and currency. */ isAmount: (potentialAmount: unknown) => potentialAmount is Amount, /** * Render an amount with decimal separator and currency symbol. * @param {object} money Money with amount property and optionally currency property. * @param {void|string} locale Locale to format the amount in. * @param {number} maximumFractionDigits Maximum number of decimals to display. * @return {string} Formatted amount. */ renderAmount: (money: Amount | null, locale?: string, maximumFractionDigits?: number) => string | undefined, /** * Alias for renderAmount(money). Render an amount with decimal separator and currency symbol. * @param {object} money Money with amount property and optionally currency property. * @return {string} Formatted amount. */ renderMoney: (money: Amount | null, locale?: string, maximumFractionDigits?: number) => string | undefined, /** * Render an amount with decimal separator but without currency symbol. * @param {object} money Money with amount property and optionally currency property. * @param {void|string} locale Locale to format the amount in. * @param {number} minimumFractionDigits Minimum number of decimals to display. * @param {number} maximumFractionDigits Maximum number of decimals to display. * @return {string} Formatted number. */ renderNumberAmount: (money: Amount, locale?: string, minimumFractionDigits?: number, maximumFractionDigits?: number) => string, /** * Round a number to a given precision. * @param {string} number Number with decimals to round. * @param {number} precision Number of decimals to round amount to. * @return {number} Rounded number. */ round: (number: number | string, precision: number) => number, /** * Compare amounts. * @param {object} amount1 Amount 1. * @param {object} amount2 Amount 2. * @param {number} precision Decimal precision, defaults to 2 decimals. * @returns {boolean} Whether the amounts are equal regarding amount to the specified precision and the currency. */ amountEquals: (amount1: T1, amount2: T2, precision?: number) => boolean; export { isAmount, renderAmount, renderMoney, renderNumberAmount, round, amountEquals, };