Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeScript typings #11

Open
muuvmuuv opened this issue Jun 27, 2019 · 4 comments
Open

TypeScript typings #11

muuvmuuv opened this issue Jun 27, 2019 · 4 comments

Comments

@muuvmuuv
Copy link

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.

@doowb
Copy link
Owner

doowb commented Jun 27, 2019

If you'd like to do a PR to add a TypeScript definitions file that would be appreciated!

@mpiroc
Copy link

mpiroc commented May 9, 2020

I'm taking a stab at it. Some questions:

  1. NpmApi.use and NpmApi.reset don't use the _privatemethod naming convention, but aren't mentioned in the docs. Are these methods intended for external use?
  2. What is the expected type of options in NpmApi's constructor? As far as I can tell, these options are only used when calling the function returned from calling lib/plugins/downloads. But this function has 0 arguments.

@mpiroc
Copy link

mpiroc commented May 9, 2020

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.

mpiroc#1

@c0ncentus
Copy link

still alive ? it would be great to implement this : / ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants