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

Consider the file in package.json types not to be unused #607

Closed
fcostarodrigo opened this issue Apr 27, 2024 · 3 comments
Closed

Consider the file in package.json types not to be unused #607

fcostarodrigo opened this issue Apr 27, 2024 · 3 comments
Labels
feature request Feature request

Comments

@fcostarodrigo
Copy link

fcostarodrigo commented Apr 27, 2024

In a lib written in JS with the type declared in an index.d.ts referenced in the package.json types field, knip reports index.d.ts as unused.

It would be nice if knip would recognize that this file is used because it exports the types.

Stack Blitz example: https://stackblitz.com/edit/stackblitz-starters-q7yeyg (run npm test)

@fcostarodrigo fcostarodrigo added the feature request Feature request label Apr 27, 2024
@webpro webpro closed this as completed in 296ab06 May 4, 2024
@webpro
Copy link
Collaborator

webpro commented May 4, 2024

🚀 This issue has been resolved in v5.12.2. See Release 5.12.2 for release notes.

Using Knip in a commercial project? Please consider sponsoring me.

@webpro
Copy link
Collaborator

webpro commented May 4, 2024

Thanks for the report, @fcostarodrigo!

@fcostarodrigo
Copy link
Author

Thank you very much @webpro 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Feature request
Projects
None yet
Development

No branches or pull requests

2 participants