Closed jurosh closed 2 years ago
Is there an issue with using new
? It is meant to be used as a class after all.
There is problem creating instance of bignumber in typescript (probably also in JavaScript)
No, it's just in typescript.
This stackoverflow post seems to give some workarounds but I am not going to try and fix this issue myself.
I recommend that typescript users just use new
.
Of course, if someone wants to amend the bignumber.d.ts file to fix this issue then a PR wpuld be welcome.
There is problem creating instance of bignumber in typescript (probably also in JavaScript)
There is error :
Value of type 'typeof BigNumber' is not callable. Did you mean to include 'new'?
As per doc
new
keyword for creating instance of Bignumber should not be required.