mathjs number-only with typescript?

Viewed 574

I'm trying to use mathjs in a typescript project. I'd like to use the "number-only" part (avoiding BigNumbers and Fractions). I've done yarn add mathjs and yarn add @types/mathjs.

In my code, I tried to import it like this:

import * as math from 'mathjs/number'

but I get a typescript error: Could not find a declaration file for module 'mathjs/number'

I can do import * as math from 'mathjs' but then I get BigNumbers popping up all over when I use it. Anyone know how to use it like this?

0 Answers
Related