peterolson / BigInteger.js

An arbitrary length integer library for Javascript
The Unlicense
1.12k stars 187 forks source link

Add TypeScript Definition #94

Closed toefraz closed 7 years ago

toefraz commented 7 years ago

This PR adds a TypeScript definition file that describes the shape of BigInteger.js.

It also updates npm test to run a test file that will break when new methods are added/removed to inform the developer that those changes should be made to the definition file too to keep it in sync.

I couldn't run the test suite without upgrading the Karma PhantomJS runner. Let me know if there are issues upgrading it.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 99.634% when pulling 4fffe24c0df17853751c90b27ddab80273fd1259 on toefraz:master into 20b3e965a2983311fb0e7028fa318d491df0174c on peterolson:master.

peterolson commented 7 years ago

Thanks, looks good to me.

toefraz commented 7 years ago

Thanks! Any idea when a new release with this will be published?

peterolson commented 7 years ago

I just added a release now

toefraz commented 7 years ago

Awesome, I appreciate it. Is it a problem that the version in package.json is the same as the previous release?

zokker13 commented 6 years ago

How can you actually use this? I get 'cant find module' all the time. This is my import: import * as bigInt from 'big-integer'

toefraz commented 6 years ago

Yep, that's how it should be imported. It could something else going on with your TypeScript configuration.

toefraz commented 6 years ago

@zokker13 Sorry to pry, but I just took a look at the tsconfig for your "node-manipulate_my_memory" project, and I believe moduleResolution should be set to "node", not "classic". Hopefully that helps

toefraz commented 6 years ago

Also lol at the commits

zokker13 commented 6 years ago

@toefraz That did the trick, thank you very much! That was a rough night :()

Sry for derailing this PR. Wonderful work!