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

Incorrectly reporting exports in namespace that are used in the current file #147

Closed
Jym77 opened this issue Jun 26, 2023 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@Jym77
Copy link

Jym77 commented Jun 26, 2023

MWNE:

namespace Foo {
  export type Bar = number
  export const bar = 2
}

type FooBar = Foo.Bar
const foobar = Foo.bar

When running knip (default configuration), I get:

Unused exports (1)
bar  src/knip.ts
Unused exported types (1)
Bar  type  src/knip.ts

yet both exports are actually used in the same file, and removing the export keyword would be a mistake.

@Jym77 Jym77 added the bug Something isn't working label Jun 26, 2023
@webpro
Copy link
Collaborator

webpro commented Jun 26, 2023

🚀 This issue has been resolved in v2.14.3. See Release 2.14.3 for release notes.

@webpro webpro closed this as completed in 858054b Jun 26, 2023
@webpro
Copy link
Collaborator

webpro commented Jun 26, 2023

Thanks for reporting this @Jym77. Guess it's not very common, but valid use case.

@Jym77
Copy link
Author

Jym77 commented Jun 27, 2023

Amazing 🎉 Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants