BN.js typings that allow natural imports.
yarn install --dev bn.js-typings
First, you need to make sure that our package is included in your tsconfig.json
file.
"include": [
"./lib/**/*.ts",
"./node_modules/bn.js-typings/index.d.ts"
]
Then use it simply like this:
import { BN } from "bn.js"