import { Locale, MlsNumberFormatQuery, MlsNumberLocalization } from '@softeq/mls'; import { Maybe } from '@softeq/types'; import { ValidationErrors } from '@angular/forms'; export interface NumberLocalizationOptions { grouping: boolean; groupSeparator: string; decimalSeparator: string; } /** * This class provides very poor implementation of localizable number parser. * It was implemented to avoid usage of fat parsing libraries. * * If capabilities of this class will be not enough we can integrate good and robust library. * * TODO: refactor this class because it provides very poor implementation of number parsing */ export declare class RiNumberLocalization implements MlsNumberLocalization { private locale; private formatOptions; readonly decimalSeparator: string; readonly groupSeparator: string; readonly grouping: boolean; private numberRe; private numberGroupRe; constructor(locale: Locale, formatOptions: NumberLocalizationOptions); format(value: number, query: MlsNumberFormatQuery): string; parse(str: string): number; validate(value: number): Maybe; validateFormat(value: string): Maybe; }