Skip to content

resolveLocaleSkeleton

resolveLocaleSkeleton(formatter): LocaleNumberSkeleton

Defined in: packages/math-numbers/src/resolve-locale-skeleton.ts:60

Learns everything about how formatter renders a number that is needed to re-emit one by hand.

Costs three formatToParts calls and one format, so a caller rendering many values resolves it once and keeps it — which is what formatNumeral does.

The probe is magnitude-independent by construction: separators, grouping sizes, digit set and the surrounding literals do not vary with the value. Two things do, and neither survives this treatment — compact notation (1.2M) and long or narrow unit names both select a CLDR pattern by magnitude and plural category, so a small probe cannot predict a large value’s output.

NumberFormat

The formatter to interrogate.

LocaleNumberSkeleton

The recovered skeleton.