/
githubmirror
/
TypeScript
Обзор
Документация
Войти
/
githubmirror
/
TypeScript
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/lib/es2023.intl.d.ts
46 строк
2 KB
Copilot
Add approximatelySign to NumberFormatRangePartTypeRegistry for ES2023 (#62013)
07 фев 2026, 00:49
Не верифицирован
07 фев 2026, 00:49
fbe2219
Код
Авторство
О чём код?
declare namespace Intl { interface NumberFormatOptionsUseGroupingRegistry { min2: never; auto: never; always: never; } interface NumberFormatOptionsSignDisplayRegistry { negative: never; } interface NumberFormatRangePartTypeRegistry extends NumberFormatPartTypeRegistry { approximatelySign: never; } type NumberFormatRangePartTypes = keyof NumberFormatRangePartTypeRegistry; interface NumberFormatOptions { roundingPriority?: "auto" | "morePrecision" | "lessPrecision" | undefined; roundingIncrement?: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000 | undefined; roundingMode?: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven" | undefined; trailingZeroDisplay?: "auto" | "stripIfInteger" | undefined; } interface ResolvedNumberFormatOptions { roundingPriority: "auto" | "morePrecision" | "lessPrecision"; roundingMode: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven"; roundingIncrement: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000; trailingZeroDisplay: "auto" | "stripIfInteger"; } interface NumberRangeFormatPart { type: NumberFormatRangePartTypes; value: string; source: "startRange" | "endRange" | "shared"; } type StringNumericLiteral = `${number}` | "Infinity" | "-Infinity" | "+Infinity"; interface NumberFormat { format(value: number | bigint | StringNumericLiteral): string; formatToParts(value: number | bigint | StringNumericLiteral): NumberFormatPart[]; formatRange(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): string; formatRangeToParts(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): NumberRangeFormatPart[]; } }