npm-api
npm-api copied to clipboard
TypeScript typings
Came across this project because I had to access NPM api with simple hooks but I'm using TypeScript and get typing errors. Would be great if you could create a typings file for those who include it in there TypeScript projects.
If you'd like to do a PR to add a TypeScript definitions file that would be appreciated!
I'm taking a stab at it. Some questions:
NpmApi.useandNpmApi.resetdon't use the_privatemethodnaming convention, but aren't mentioned in the docs. Are these methods intended for external use?- What is the expected type of
optionsinNpmApi's constructor? As far as I can tell, these options are only used when calling the function returned from callinglib/plugins/downloads. But this function has 0 arguments.
Here's an initial attempt. I'm going to try it in my own project for a bit before submitting a PR to this repo.
https://github.com/mpiroc/npm-api/pull/1
still alive ? it would be great to implement this : / ...