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: false positive for node built-in module types #444

Closed
sveyret opened this issue Oct 31, 2019 · 1 comment
Closed

TypeScript: false positive for node built-in module types #444

sveyret opened this issue Oct 31, 2019 · 1 comment

Comments

@sveyret
Copy link
Contributor

sveyret commented Oct 31, 2019

Bug Description

In TypeScript, when using built-in modules, we can import the typing definition named @types/node. Unlike other @types imports, this one does not use the module name, it is a single typing module for all built-in modules.
For that reason, this typing module is not detected as used.

Code snippets

Where the dependency is used:

import * as path from 'path';

Where the dependency is listed in package.json:

"devDependencies": {
  "@types/node": "12.11.7"
}

Versions

  • node -v: any
  • npm -v: any
  • depcheck --version: 0.8.4

Extra info

I will provide a PR.

@rumpl
Copy link
Member

rumpl commented Nov 1, 2019

PR merged, closing this thanks

@rumpl rumpl closed this as completed Nov 1, 2019
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