bpierre/dnum

toNumber typing requires the decimals parameter

nbran opened this issue · 1 comments

First of all, thanks for working on this library, it's incredibly useful and well designed.

The docs seem to state that the number of digits is optional for the toNumber utility:

Defaults to the number of decimals in the Dnum passed to value.

However, TS will complain if/when only the Dnum is passed. This doesn't happen with the options for other utilities (e.g., format).

Fixed and released! https://github.com/bpierre/dnum/releases/tag/v2.12.0

Thanks for reporting the issue and for the kind words @nbran! 🙏 ❤️