total-typescript / ts-reset

A 'CSS reset' for TypeScript, improving types for common JavaScript API's
https://www.totaltypescript.com/ts-reset
MIT License
7.74k stars 117 forks source link

Improvement to Intl namespace types #177

Open pc-erin opened 8 months ago

pc-erin commented 8 months ago

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.