import { CurrencySettings } from './types/currency-settings'; export declare class Currency { intValue: number; value: number; private settings; private precisionFactor; private toWordsInstance; constructor(value: number | string | Currency, options?: Partial); /** * Parses the input value into an integer representation suitable for currency calculations. * @param value - The value to parse (number, string, or Currency instance). * @returns Parsed integer value. */ private parseValue; /** * Adds a specified amount to the currency value. * @param amount - The amount to add (number, string, or Currency instance). * @returns New Currency instance with the summed value. * @example * const currency = new Currency(10); * const result = currency.add(5); // Result is a new Currency instance with value 15 */ add(amount: number | string | Currency): Currency; /** * Subtracts a specified amount from the currency value. * @param amount - The amount to subtract (number, string, or Currency instance). * @returns New Currency instance with the difference. * @example * const currency = new Currency(10); * const result = currency.subtract(5); // Result is a new Currency instance with value 5 */ subtract(amount: number | string | Currency): Currency; /** * Multiplies the currency value by a specified factor. * @param factor - The factor to multiply by. * @returns New Currency instance with the multiplied value. * @example * const currency = new Currency(10); * const result = currency.multiply(2); // Result is a new Currency instance with value 20 */ multiply(factor: number): Currency; /** * Divides the currency value by a specified divisor. * @param divisor - The divisor to divide by. * @returns New Currency instance with the divided value. * @example * const currency = new Currency(10); * const result = currency.divide(2); // Result is a new Currency instance with value 5 */ divide(divisor: number): Currency; /** * Distributes the currency value into an array of Currency instances evenly. * @param parts - The number of parts to distribute into. * @returns Array of Currency instances with the distributed values. * @example * const currency = new Currency(100); * const parts = currency.distribute(3); // Returns an array of 3 Currency instances with values [33.34, 33.33, 33.33] */ distribute(parts: number): Currency[]; /** * Returns the dollar portion of the currency value. * @returns The dollar value as an integer. * @example * const currency = new Currency(123.45); * const dollars = currency.dollars(); // Returns 123 */ dollars(): number; /** * Returns the cent portion of the currency value. * @returns The cent value as an integer. * @example * const currency = new Currency(123.45); * const cents = currency.cents(); // Returns 45 */ cents(): number; /** * Formats the currency value as a string according to the formatting settings. * @param options - Optional formatting options. * @returns The formatted currency string. * @example * const currency = new Currency(1234.56); * const formatted = currency.format(); // Returns '$1,234.56' */ format(options?: Partial): string; /** * Converts the currency value to a string. * @returns String representation of the currency value. * @example * const currency = new Currency(1234.56); * const value = currency.toString(); // Returns '1234.56' */ toString(): string; /** * Returns the currency value for JSON serialization. * @returns The numeric value for serialization. * @example * const currency = new Currency(1234.56); * JSON.stringify(currency); // Returns '1234.56' */ toJSON(): number; /** * Converts the currency value to words. * @param options - Optional converter options for customizing the conversion. * @returns The currency value in words. * @example * const currency = new Currency(1234.56); * const words = currency.toWords(); // Returns 'one thousand two hundred thirty-four dollars and fifty-six cents' */ toWords(): string; }