MikeMcl / bignumber.js

A JavaScript library for arbitrary-precision decimal and non-decimal arithmetic
http://mikemcl.github.io/bignumber.js
MIT License
6.68k stars 742 forks source link

Added Typescript support in README docs #271

Closed claytn closed 4 years ago

MikeMcl commented 4 years ago

The existing line in the README:

import BigNumber from "./bignumber.mjs";

was just to just demonstrate that the library can be imported in browsers and node.js by specifying the path to the single file, bignumber.mjs. It was not intended to demonstrate how to load the library after the npm install bignumber.js as shown in the separate section above it.

I have updated the README to make it explicit that npm users can import the library using

import BigNumber from "bignumber.js";

I see no need for a typescript section, as there is no difference.