-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Error with analyzer.ts when expanding exports from * #132
Comments
Here's my TSConfig:
And export * from "./web-chart";
export * from "./data-source"; |
@maneetgoyal thank you for finding this! Hope to have a patch ready shortly Sean |
|
@maneetgoyal I cannot reproduce this issue. I have a patch that should prevent the error - but you may then have some code that is not analysed. If you have the time, it would great to have a complete example, with the TypeScript source code. For an example, please see the issue #123 |
(related) |
Hi @mrseanryan, thanks a ton for looking into this. I'll try the updated version. And get back. Will try to have a demo TS project too for reproducing if needed. However, ignoring
All the core business logic is in |
I see ... let me know how it goes! |
Hi @mrseanryan, I gave it a try. Ran into the following difficulties:
Lastly, in the concerned project we already have a linting system in place. After spending a good amount of time on making this tool work, I decided to go with using this approach. The best benefit of it was that linter check alone was able to identify unused exports and a lot of configuration and setting up of new CLI commands was avoided. Now I am just very much looking forward to a fix for #19. That will be a great feature to have. |
hi @maneetgoyal
example:
That's good if you found another approach that works ... In my opinion #19 is not really just a fix, it could be a whole rewrite of the project ... |
Hi @mrseanryan, Thanks for the follow up. Truly appreciate it :)
Initially, when I started working with this tool, I also came across: "Note that if ts-unused-exports is called without files, the files will be read from the tsconfig's files or include key which must be present. If called with files, then those file paths should be relative to the tsconfig.json, just like you would specify them in your tsconfig's files key." But in my export * from "./file-a.ts";
export * from "./file-b.ts";
export * from "./file-c.ts";
export {AAA, BBB} from "./file-d.ts"; I suspected that the |
@maneetgoyal But I would xpect also that the exported types could be flagged as unused exports, This kind of "library support" is an open issue #105 issue #30 is possibly also relevant. |
@maneetgoyal if you'd like the index.ts entry to be handled, you can give a thumbs up on #105. And perhaps you could provide feedback when we have a fix? |
@mrseanryan I'll go through its description and comment there soon. :) |
Locking this issue - let's use more appropriate issues (or a log a new one) instead of continuing discussions here .... |
Error log:
Upon putting
console.log
in theanalyzer
script:I got:
Looks like the analyzer is expecting the
exportMap
is a different format.The text was updated successfully, but these errors were encountered: