/** * Shared memoized `Intl` formatter factories. Constructing an * `Intl.NumberFormat` / `Intl.DateTimeFormat` / `Intl.DisplayNames` / `Intl.ListFormat` / * `Intl.RelativeTimeFormat` / `Intl.PluralRules` / `Intl.Collator` / `Intl.Segmenter` performs an ICU locale-data * lookup that is orders of magnitude slower than reusing an existing * instance, and per-row template loops (table cells, chart points, feed * entries) would otherwise pay that cost once per row on every render pass. * One instance per locale + options pair is shared across all components on * the page. * * Each kind keeps at most {@link MAX_ENTRIES_PER_KIND} entries, evicting the * least recently used beyond that, so pages that churn through many locales * or option shapes cannot grow the caches without bound. */ /** * Converts an author-supplied locale into the canonical, structurally valid tag used at every * `Intl` boundary. Message lookup deliberately does not use this function: synthetic catalog * keys such as `x-test` must remain addressable even though ECMA-402 formatters reject them. * * Browsers and translation tools sometimes produce underscore tags (`en_US`) or the sentinel * `auto`; arbitrary `lang`/`locale` attributes can also be malformed. Underscores are normalized * before validation, while an empty, sentinel, synthetic, or malformed tag falls back to English * instead of turning an ordinary component render into a `RangeError`. */ export declare function resolveIntlLocale(locale:string|undefined):string; /** * A shared `Intl.NumberFormat` for the given locale and options. `undefined` and malformed input * safely select the library's deterministic English fallback. */ export declare function getNumberFormat(locale:string|undefined,options?:Intl.NumberFormatOptions):Intl.NumberFormat; /** A shared `Intl.DateTimeFormat` for the given locale and options. */ export declare function getDateTimeFormat(locale:string|undefined,options?:Intl.DateTimeFormatOptions):Intl.DateTimeFormat; /** * A shared `Intl.DisplayNames` for the given locale and options. Note the * `Intl.DisplayNames` constructor itself requires `options.type`, so omitting * the options throws the same `TypeError` a direct construction would. */ export declare function getDisplayNames(locale:string,options?:Intl.DisplayNamesOptions):Intl.DisplayNames; /** A shared `Intl.ListFormat` for the given locale and options. */ export declare function getListFormat(locale:string|undefined,options?:Intl.ListFormatOptions):Intl.ListFormat; /** A shared `Intl.RelativeTimeFormat` for the given locale and options. */ export declare function getRelativeTimeFormat(locale:string|undefined,options?:Intl.RelativeTimeFormatOptions):Intl.RelativeTimeFormat; /** A shared `Intl.PluralRules` instance for the given locale and options. */ export declare function getPluralRules(locale:string|undefined,options?:Intl.PluralRulesOptions):Intl.PluralRules; /** A shared `Intl.Collator` instance for the given locale and options. */ export declare function getCollator(locale:string|undefined,options?:Intl.CollatorOptions):Intl.Collator; /** A shared `Intl.Segmenter` instance for the given locale and options. */ export declare function getSegmenter(locale:string|undefined,options?:Intl.SegmenterOptions):Intl.Segmenter;