-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Open
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do thisYou can do this
Milestone
Description
⚙ Compilation target
ES2022
⚙ Library
ES2023
Missing / Incorrect Definition
Intl.NumberFormatPartTypeRegistry
doesn't include "approximatelySign" in it
Sample Code
const nf = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "EUR",
maximumFractionDigits: 0,
});
nf
.formatRangeToParts(value.from, value.to)
.filter((part) => part.type !== "approximatelySign")
.map((part) => part.value)
.join("");
Documentation Link
Here states that "approximately equals" sign is added when range rounds up to the same value
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/formatRange#using_formatrange
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do thisYou can do this