import { Decimal, RoundingModeType } from '@phensley/decimal'; import { NumberFormatOptions } from '../../common'; import { NumberPattern } from '../../parsing/number'; /** * Provides a context to set number formatting parameters, combining user-supplied * options with defaults based on modes and the number pattern. */ export declare class NumberContext { readonly roundingMode: RoundingModeType; readonly options: NumberFormatOptions; useSignificant: boolean; minInt: number; maxFrac: number; minFrac: number; maxSig: number; minSig: number; currencyDigits: number; constructor(options: NumberFormatOptions, roundingMode: RoundingModeType, compact: boolean, scientific: boolean, currencyDigits?: number); /** * Set a pattern. The 'scientific' flag indicates the pattern uses significant * digits, which we will copy from the pattern's min/max fractions. */ setPattern(pattern: NumberPattern, scientific?: boolean): void; /** * Set a compact pattern. */ setCompact(pattern: NumberPattern, integerDigits: number, _divisor: number, maxFracDigits?: number): void; /** * Adjust the scale of the number using the resolved parameters. */ adjust(n: Decimal, scientific?: boolean): Decimal; /** * Set context parameters from options, pattern and significant digit arguments. */ private _setPattern; }