mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Accept decimal strings in Intl.NumberFormat (#57595)
Co-authored-by: Renegade334 <contact.9a5d6388@renegade334.me.uk>
This commit is contained in:
co-authored by
Renegade334
parent
a2d37a5c60
commit
bdd1f947f6
Vendored
+6
-2
@@ -27,8 +27,12 @@ declare namespace Intl {
|
||||
source: "startRange" | "endRange" | "shared";
|
||||
}
|
||||
|
||||
type StringNumericLiteral = `${number}` | "Infinity" | "-Infinity" | "+Infinity";
|
||||
|
||||
interface NumberFormat {
|
||||
formatRange(start: number | bigint, end: number | bigint): string;
|
||||
formatRangeToParts(start: number | bigint, end: number | bigint): NumberRangeFormatPart[];
|
||||
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[];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user