Typescript Typings for bignumber.js.
typings install --save bignumber.js
import BigNumber from 'bignumber.js';
const x = new BigNumber(0.1);
const y = x.plus(0.2); // '0.3'
new BigNumber(0.7).plus(x).plus(y); // '1'
x.plus('0.1', 8); // '0.225'
The tests use examples from the docs.
You can run them by running npm run build
and npm run test
.