Improvement to Intl namespace types
Author: pc-erinCreated Nov 15, 2023Updated Apr 1, 2026
Labelsenhancementneeds-triage
Would anyone else find it useful to add the string type to the number passed to a NumberFormat.format call?
I've been using this with a decimal math library, and am trying to avoid losing any precision while doing math and displaying the end results.
According to MDN it's fine to pass a string to the format method, but the typescript standard lib only types that parameter as number | bigint. So, passing a string, while allowed by the API, still shows a type error.
I can submit a pull request for this if you're willing to accept it.
Source: mattpocock/ts-reset