import { CurrencyType, PluralType } from '@phensley/cldr-types'; import { Decimal, Part } from '@phensley/decimal'; import { CurrencyFormatOptions, CurrencySymbolWidthType, DecimalAdjustOptions, DecimalFormatOptions } from '../../common'; import { NumberParams } from '../../common/private'; import { NumberPattern } from '../../parsing/number'; import { Bundle } from '../../resource'; import { Internals, NumberInternals, NumberRenderer } from '../../internals/internals'; /** * Number internal engine singleton, shared across all locales. * * @internal */ export declare class NumberInternalsImpl implements NumberInternals { private internals; private currencies; private numbers; private readonly numberPatternCache; constructor(internals: Internals, cacheSize: number); adjustDecimal(num: Decimal, options?: DecimalAdjustOptions): Decimal; stringRenderer(params: NumberParams): NumberRenderer; partsRenderer(params: NumberParams): NumberRenderer; getCurrencySymbol(bundle: Bundle, code: CurrencyType, width?: CurrencySymbolWidthType): string; private _getCurrencySymbol; getCurrencyDisplayName(bundle: Bundle, code: CurrencyType): string; getCurrencyPluralName(bundle: Bundle, code: string, plural: PluralType): string; getNumberPattern(raw: string, negative: boolean): NumberPattern; formatDecimal(bundle: Bundle, renderer: NumberRenderer, n: Decimal, options: DecimalFormatOptions, params: NumberParams): [T, PluralType]; formatCurrency(bundle: Bundle, renderer: NumberRenderer, n: Decimal, code: string, options: CurrencyFormatOptions, params: NumberParams): T; /** * Setup for a compact pattern. Returns the adjusted number and digits for * selecting the pluralized pattern. * * The extra complexity here is to deal with rounding up and selecting the * correct pluralized pattern for the final rounded form. */ private setupCompact; private setupCompactDivisor; private getCompactPattern; }