We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new
There is problem creating instance of bignumber in typescript (probably also in JavaScript)
import BigNumber from 'bignumber.js'; const bn = BigNumber('0.123');
There is error : Value of type 'typeof BigNumber' is not callable. Did you mean to include 'new'?
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.
The text was updated successfully, but these errors were encountered:
Is there an issue with using new? It is meant to be used as a class after all.
Sorry, something went wrong.
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.
b951358
No branches or pull requests
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.The text was updated successfully, but these errors were encountered: