Skip to content

NumberFormatPartTypeRegistry doesn't have approximatelySign in it #61960

Open
@SalOne22

Description

@SalOne22

⚙ 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

No one assigned

    Labels

    BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions