-
-
Notifications
You must be signed in to change notification settings - Fork 164
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
🐛 TS4023 from removing reported unused export if exported type is referenced implicitly in another package #808
Comments
Thanks for the report, @aaayane! Could you please try with this one:
Happy to know if this works better for you! |
Looks like this has been resolved, thanks for your work! |
@webpro By the way, I may have found another problem Reproduction urlhttps://stackblitz.com/edit/github-a4rrlb-7fzqsb?file=README.md,packages%2Fshared%2Fsrc%2Ffile2.ts Description of the issueWhen I export destructuring assignment, using fix will mistakenly delete the variable being used When I wrote the example, I found that using npm only prompts unused exports, but using pnpm will delete the definition of a. I don’t know what the difference is between the two. It seems that there is an error when using pnpm。 See the readme of the linked reproduction for exactly how this can happen |
Thanks @aaayane! Very happy with your feedback. Things should be better now here:
Ideally, the |
it's worked, , thanks for your work, this project is great and solved my problem |
Nice! The implementation is something I need to clean up, and removing the |
🚀 This issue has been resolved in v5.33.3. See Release 5.33.3 for release notes. Using Knip in a commercial project? Please consider becoming a sponsor. |
Prerequisites
Reproduction url
https://stackblitz.com/edit/github-a4rrlb-3x1iep?file=README.md
Reproduction access
Description of the issue
Hi, thanks for your work on this project. I think I have a similar problem which doesn't seem to be solved in the new version.(knip 5.33.2).
from https://github.com/webpro-nl/knip/issues/801
When exporting a function, the reference type will still prompt that it is not used
Reproduction url
https://stackblitz.com/edit/github-a4rrlb-3x1iep?file=README.md
Description of the issue
When exporting a function, the reference type will still prompt that it is not used
TS4023: Exported variable 'sharedFunction' has or is using name 'Error1' from external module "/home/projects/github-a4rrlb/packages/shared/src/file2" but cannot be named.
See the readme of the linked reproduction for exactly how this can happen
The text was updated successfully, but these errors were encountered: