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

How to download @types of a project only #813

Open
MatthD opened this issue Nov 6, 2023 · 3 comments
Open

How to download @types of a project only #813

MatthD opened this issue Nov 6, 2023 · 3 comments

Comments

@MatthD
Copy link

MatthD commented Nov 6, 2023

I am looking for a way to download the types definitions for my dependencies of my project.

The idea is:

  • I am working working with docker on Mac host so my package are installed inside them
  • I do not need (and I cannot because some packages don't install corectly on Mac) to download the wholes packages module .
  • I need typing of packages on my host to have good dev experience.

Because package.json have a types fields I suppose there is a way to only download them but no luck to find how.

@jakebailey
Copy link
Member

I don't quite understand what you're asking for; if you're depending on @types packages, they will be installed from npm and you will only get what is required. There's no way to avoid using a package manager here.

@MatthD
Copy link
Author

MatthD commented Nov 7, 2023

Ok so to be clear, for the moment to have a dev-experience that is good enough with docker and typescript .
I do a copy of node_modules and filter to keep only package.json and all .d.ts and expose them as a volume to Mac host.

Just thinking it could be could if there is a tool at DefinitelyTyped-tools to only download types of modules of a project and not install the whole deps.

@jakebailey
Copy link
Member

I don't understand the motivation for doing such a thing, but either way, this repo holds tooling for developing DefinitelyTyped itself, not tooling for using types packages. This request seems out of scope.

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

2 participants