UNPKG

atomic-fns

Version:

Like Lodash, but for ESNext and with types. Stop shipping code built for browsers from 2015.

25 lines (24 loc) 812 B
import { Decimal } from '../decimal/index.js'; /** * Currency represents a local currency amount that can be formatted using the `Intl` apis. */ export declare class Currency extends Decimal { private readonly locale; private readonly currency; private readonly numberFormat; private readonly options; constructor(amount: any, currency: string, locale?: string, opts?: Intl.NumberFormatOptions); clone(n: any): Currency; negated(): Currency; add(x: any): Currency; sub(x: any): Currency; div(x: any): Currency; mul(x: any): Currency; toDecimal(): any; toString(): string; format(opts?: Intl.NumberFormatOptions, locale?: string): string; displayName(): string; accounting(): string; precision(digits?: number): string; eq(x: any): any; }