You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My project contains .js files coupled with their typescript typedefs in .d.ts files. I'm running
depcheck --parsers="*.js:es6,*.d.ts:typescript"
I'd think this would work since the usages in the d.ts files are just normal es import statements. The only unusual thing about the contents of a d.ts file are that they contain the declare keyword.
The text was updated successfully, but these errors were encountered:
Ah yes, this is also because you are transpiling to sources instead of checking the typescript itself. There's a highly relevant comment here but it leaves me at a bit of a loss.
For one, the referenced issue, #163, is pretty decidedly a different problem. An @types/foo package is consumed when foo is imported or required in the transpiled code. Nothing about the current solution to parsing typescript precludes such a detector from being written.
This issue on the other hand, and #359, definitely require a different way of parsing typescript -- in particular they need to work on the actual typescript AST instead of the transpiled code.
With the advent of @babel/plugin-syntax-typescript I don't see a need to use the real typescript compiler at all. We can just run babel on the typescript sources and all the normal require/import detectors should work fine.
My project contains
.js
files coupled with their typescript typedefs in.d.ts
files. I'm runningI'd think this would work since the usages in the d.ts files are just normal es import statements. The only unusual thing about the contents of a d.ts file are that they contain the
declare
keyword.The text was updated successfully, but these errors were encountered: