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

False alert: TypeScript import type not detected #438

Closed
sveyret opened this issue Oct 31, 2019 · 3 comments
Closed

False alert: TypeScript import type not detected #438

sveyret opened this issue Oct 31, 2019 · 3 comments

Comments

@sveyret
Copy link
Contributor

sveyret commented Oct 31, 2019

Bug Description

Since TypeScript 2.9, it is possible to import only types from a module. See https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-9.html#import-types
These imports are not detected and therefore are creating false alerts.

Code snippets

Where the dependency is used:

import('module').Type

Where the dependency is listed in package.json:

"devDependencies": {
  "module": "x.x.x",
}

Versions

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

Extra info

It seems that the PR #429 is already correcting this issue. I will provide another PR because I already did the correction in my system (adding a detector), but do not hesitate and discard it if useless.

@rumpl
Copy link
Member

rumpl commented Oct 31, 2019

There is another PR that was merged for better TS support (#422), it's not perfect yet, needs more work. I'll take a look at yours soon

@sveyret
Copy link
Contributor Author

sveyret commented Oct 31, 2019

Thank you @rumpl.
I already use v0.8.4, which, if I am not mistaken, includes PR #422. It does not correct the issue mentioned here.

rumpl pushed a commit that referenced this issue Nov 1, 2019
@rumpl
Copy link
Member

rumpl commented Nov 1, 2019

Closed by #445

@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