UNPKG

@accounter/server

Version:

9 lines (8 loc) 874 B
import { Currency, FinancialAmount, FinancialIntAmount } from '../../__generated__/types.js'; export declare const addCommasToStringifiedInt: (rawAmount: string | number) => string; export declare const formatStringifyAmount: (rawAmount: number) => string; export declare const formatFinancialAmount: (rawAmount?: number | string | null, rawCurrency?: string | null) => FinancialAmount; export declare function formatCurrency<T extends boolean = false>(raw?: string | null, nullable?: T): Currency | (T extends true ? null : never); export declare function getCurrencySymbol(currency: Currency): "GRT" | "USDC" | "$" | "£" | "€" | "C$" | "₪" | "Ξ"; export declare const formatFinancialIntAmount: (rawAmount?: number | string | null, rawCurrency?: string | null) => FinancialIntAmount; export declare const formatAmount: (rawAmount?: number | string | null) => number;