question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Move @types deps to devDependencies

See original GitHub issue

There is a bunch of @types packages in dependencies, seems they should not be needed by the end user, just for the sake of keeping things clean.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
stelcheckcommented, Dec 10, 2017

I believe this is incorrect; for instance, you may want to use this repository programmatically to create your own customized TypeScript-enabled REPL. In such case, I believe the types need to be present for your dependent code to compile, but let me know if this is incorrect.

1reaction
wclrcommented, Dec 10, 2017

It depends on whether exported API uses those typings or not.

    "@types/arrify": "^1.0.1",
    "@types/diff": "^3.2.1",
    "@types/minimist": "^1.2.0",
    "@types/mkdirp": "^0.5.0",
    "@types/node": "^8.0.27",
    "@types/source-map-support": "^0.4.0",
    "@types/v8flags": "types/npm-v8flags#de224ae1cd5fd7dbb4e7158a6cc7a29e5315930d",
    "@types/yn": "types/npm-yn#ca75f6c82940fae6a06fb41d2d37a6aa9b4ea8e9",

I see that https://github.com/TypeStrong/ts-node/blob/master/src/index.ts#L29 exported interfaces don’t use them.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Move @types dependencies to devDependencies #862 - GitHub
Do the following deps need to be in the "dependencies" section of package.json? Can they be moved to "devDependencies" instead?
Read more >
Move a module from devDependencies to ... - Stack Overflow
Shorthand to move from devDependencies to dependencies (prod): npm i <module_name> -P. If you want to do the opposite (i.e. move a module ......
Read more >
npm move package from devdependencies to dependencies Code ...
Answers related to “npm move package from devdependencies to dependencies”. difference between devDependency and dependency · npm remove dev dependencies ...
Read more >
Understanding and organizing dependencies in node packages
json in one of five dependency types: dependencies (default); devDependencies; peerDependencies; bundledDependencies; optionalDependencies.
Read more >
Tool to tell me which @types deps should be deps, which can ...
Typically @types dependencies of a library should be dependencies, ... which @types they reference, and move the rest into devDependencies ?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found