Type Alias NumberFormatOptions
NumberFormatOptions: Intl.NumberFormatOptions & {
style?: "decimal" | "currency" | "percent" | "unit";
unitDisplay?: "long" | "short" | "narrow";
signDisplay?: "auto" | "always" | "never" | "exceptZero" | "negative";
notation?: "standard" | "scientific" | "engineering" | "compact";
localeMatcher?: "best fit" | "lookup";
currencySign?: "accounting" | "standard";
currencyDisplay?: "symbol" | "narrowSymbol" | "code" | "name";
compactDisplay?: "short" | "long";
useGrouping?: "min2" | "auto" | "always" | boolean;
}
Options for formatting a numeric value. We override loose types from "Intl.NumberFormatOptions".
For example, the type of
stylein "Intl.NumberFormatOptions" is set to string and we overwrite it to a union of allowed values.