Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
24 lines
1.1 KiB
Plaintext
24 lines
1.1 KiB
Plaintext
import { Decimal } from "decimal.js";
|
|
import { type NumberFormatLocaleInternalData, type NumberFormatOptionsCompactDisplay, type NumberFormatOptionsCurrencyDisplay, type NumberFormatOptionsCurrencySign, type NumberFormatOptionsNotation, type NumberFormatOptionsStyle, type NumberFormatOptionsUnitDisplay, type NumberFormatPart, type RoundingModeType, type UseGroupingType } from "../types/number.js";
|
|
interface NumberResult {
|
|
formattedString: string;
|
|
roundedNumber: Decimal;
|
|
sign: -1 | 0 | 1;
|
|
exponent: number;
|
|
magnitude: number;
|
|
}
|
|
export default function formatToParts(numberResult: NumberResult, data: NumberFormatLocaleInternalData, pl: Intl.PluralRules, options: {
|
|
numberingSystem: string;
|
|
useGrouping?: UseGroupingType;
|
|
style: NumberFormatOptionsStyle;
|
|
notation: NumberFormatOptionsNotation;
|
|
compactDisplay?: NumberFormatOptionsCompactDisplay;
|
|
currency?: string;
|
|
currencyDisplay?: NumberFormatOptionsCurrencyDisplay;
|
|
currencySign?: NumberFormatOptionsCurrencySign;
|
|
unit?: string;
|
|
unitDisplay?: NumberFormatOptionsUnitDisplay;
|
|
roundingIncrement: number;
|
|
roundingMode: RoundingModeType;
|
|
}): NumberFormatPart[];
|