Provides helper methods for formatting numbers as currency.

interface PriceHelper {
    FormatCurrency(numberInstance: NumberInstance): string;
}

Methods

  • Formats a number instance into a currency string. The number is rounded to 2 decimal places before formatting.

    Parameters

    • numberInstance: NumberInstance

      An object containing the numeric value to format.

    Returns string

    A string representing the formatted currency value.

    const numberInstance = { value: 1234.5678 };
    priceHelper.FormatCurrency(numberInstance); // "$1,234.57"