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.

Typescript dependencies with format @types/xxxx are incorrectly reported when using type imports

See original GitHub issue

I have @types/estree in my package.json and a .ts which does:

import ESTree from 'estree';

This is the correct syntax, since tsc complains if you import from the @types scope.

In this case, depcheck complains about missing dependency estree.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ghostcommented, Nov 23, 2020

I feel like checking for import type would be a good way to allow importing @types/* dependencies instead.

0reactions
stale[bot]commented, Mar 26, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

False positive: types-only dependencies · Issue #568 - GitHub
Typescript dependencies with format @types/xxxx are incorrectly reported when using type imports #526. Closed.
Read more >
Highest scored 'ts-node' questions - Stack Overflow
I need to use lodash-es in my typescript project, but I can't configure it correctly, it always reports errors like SyntaxError: Unexpected identifier...
Read more >
property 'component' does not exist on type - You.com | The search ...
I finally resolved the issue. @type/react was using typescript version 2.8.1 while my project was using typescript version 2.6.2. So, I upgraded my...
Read more >
angular/angular - Gitter
Does anyone know if it is possible to get a view container reference for transcluded content? I want to reorder components that were...
Read more >
Error Ts2300: Duplicate Identifier 'Propertykey' In ... - ADocLib
I tried using the @types/xxxx package and had problems. nodemodules/@types/corejs/index.d.ts4736: error TS2304: @andyms I am not so familiar with typescript ...
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