Closed gugu91 closed 1 year ago
- What is the advised way of importing the full BigNumber type now?
Just import the default export and everything should be ok
- How to handle null dp? Just check the value first (it's recommended you have
strictNullChecks: true
in yourtsconfig
.
const dp = value.dp()
if (dp === null) {
// NaN or Infinity
...
}
Thanks for this awesome library, really grateful for all your work!
Just wanted to flag that this line is a breaking change from the standpoint of typescript.
The other breaking change is that
BigNumber.dp()
can now be null.Thought I'd leave a tiny migration guide:
null
dp?BigNumber
type now?