ts-reset icon indicating copy to clipboard operation
ts-reset copied to clipboard

Improvement to Intl namespace types

Open pc-erin opened this issue 2 years ago • 0 comments

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.

pc-erin avatar Nov 15 '23 18:11 pc-erin