ts-remove-unused
github.com · Open source · Archived
CLI that removes unused TypeScript exports automatically
- Developer tools
- Open source
- TypeScript
- Day-7 check
- Day-30 check
- typescript
- cli
- dead code
- unused exports
- typescript dead code
- remove unused code
- typescript cleanup
- tree shaking typescript
- Stars
- 1.3k
- Forks
- 21
- Open issues
- 8
- Last commit
- Releases
- 29
- Found
- 2 years ago
GitHub figures as of . They are context, not a ranking.
ts-remove-unused is a command-line tool that removes the export keyword, or the whole declaration, when an export is unused in a TypeScript project. It reads the project's tsconfig.json and needs only an entry-point file, which suits teams who want to prune dead code.
Positioned as an alternative to Knip.
Repository description on GitHub: “TypeScript Remove (tsr) is a utility that removes unused code from TypeScript projects – It's like tree shaking, but for source files”
What it does
- Removes the export keyword or whole declarations for unused exports
- Reads tsconfig.json and needs only an entry-point file
- Minimal setup with no per-file configuration required
Good for
- Remove unused exports from a TypeScript project automatically
- Prune dead code from a project as a one-off cleanup
Suits: Teams that want to prune dead TypeScript code.
Worth knowing: The project has ended, and its readme points to Knip for similar functionality.
What you can try
Read the README on GitHub and install from source.
Install
npm i tsrTaken from the project’s README. Read the project’s own instructions before running anything.
Links go to third-party sites KipFound does not control. KipFound has not installed, audited or tested this software.
Found vs. released
Kip first saw ts-remove-unused on , when kazushisan posted it to Show HN. The oldest published release on GitHub is v0.2.0, dated . ts-remove-unused had been shipping tagged releases for 360 days before it was found. 29 releases have been published in total; the latest is v1.3.4 ().
Day-7 and day-30 updates
Day 7 archived
- 2 releases in the first 7 days: v0.5.0 (21 Sep 2024), v0.5.1 (22 Sep 2024)
- The repository was archived (read-only) when checked.
- Show HN discussion at check time: 141 points, 66 comments. API record
Checked , later than day 7 because tracking began after.
Day 30 archived
- 3 releases in the first 30 days: v0.5.0 (21 Sep 2024), v0.5.1 (22 Sep 2024), v0.5.2 (23 Sep 2024)
- The repository was archived (read-only) when checked.
- Show HN discussion at check time: 141 points, 66 comments. API record
Checked , later than day 30 because tracking began after.
Release timeline every entry links to its source
- Repository created on GitHub: line/ts-remove-unused
- Release v0.2.0
- Found: kazushisan posted it to Show HN. Show HN
- Release v1.2.0
- Release v1.3.0
- Release v1.3.1
- Release v1.3.2
- Release v1.3.3
- Release v1.3.4
- Day-7 check recorded by Kip (details)
- Day-30 check recorded by Kip (details)
Showing the first and the 6 latest of 29 releases. All releases on GitHub
Quick answers
- When was ts-remove-unused released?
- Its first tagged release on GitHub is dated 22 Sep 2023. Kip found it on Show HN on 16 Sep 2024.
- Is ts-remove-unused open source?
- Its source is public on GitHub at line/ts-remove-unused under the Apache-2.0 licence.
- What does ts-remove-unused run on?
- Command line.
- Is ts-remove-unused free?
- It is open source, so the code is free to read and run; check the licence for terms.
- Is ts-remove-unused still maintained?
- No. The repository is archived (read-only).
Provenance
| Source | Record | Last checked |
|---|---|---|
| Show HN | listing official API record | |
| GitHub repository | line/ts-remove-unused REST API record | |
| GitHub Releases | release list REST API record |
Stable ID hn-41554014. Summary drafted with AI from the source records above and checked against KipFound’s rules before publishing. Dates and release facts come only from those records.
Share
Similar tools
Made this, or spotted a mistake? Ask for a correction or removal. No account or email address needed.