nowfound

Dev tools · September 16, 2024

ts-remove-unused – Remove unused code from your TypeScript project

ts-remove-unused is a command line tool for TypeScript projects that auto-fixes unused `export`s. It removes the export keyword from the declaration or the whole declaration based on its usage in the project. There are some similar tools but they are focused on "detecting" rather than "removing" so I've built one myself. I wanted a solution that's as minimal as possible; config files to specify the files in your project shouldn't be necessary because that info should be already configured in tsconfig.json. All you need to do is to specify your entrypoint file. Feedback is much appreciated!

ts-remove-unused – Remove unused code from your TypeScript project launched on September 16, 2024 with 141 votes, #440 of 5,281 launches that month and more than 95% of that year's launches. The site was still online in September 2026, 2 years on.

Visit github.com ↗Alternativestop 8% of September 2024

In plain words

ts-remove-unused is a command-line tool that automatically removes unused exports from TypeScript projects. Rather than just detecting unused code, it actively deletes the export keyword from declarations or removes them entirely based on actual usage across the project. It's designed for TypeScript developers who want minimal configuration, relying on existing tsconfig.json settings instead of requiring separate config files. Users only need to specify their project's entry point to run the tool.

written from the facts on this page · September 2026

From the sources

TypeScript Remove (tsr) is a utility that removes unused code from TypeScript projects – It's like tree shaking, but for source files - line/tsr

Does a similar job

all alternatives →
  • ts-prune – Find unused exports in a TypeScript project2019 · github.com · ▲8

    Find unused exports in a typescript project. 🛀. Contribute to nadeesha/ts-prune development by creating an account on GitHub.

  • Unused CSS2018 · unused-css.com · ▲307

    Easily find and remove unused CSS rules

  • Node.js node_modules file pruning2017 · github.com · ▲111

    Remove unnecessary files from node_modules (.md, .ts, ...) - tj/node-prune

  • TB
    ts-blank-space – fast TypeScript type-stripper2024 · bloomberg.github.io · ▲22

    We've built a new type-stripping compiler for TypeScript source: `ts-blank-space` It's: * 5.6x faster than `tsc` due to zero-codegen * Written in TypeScript * Uses the official TypeScript parser * Accurate/preserved source locations * In used in production It uses the same novel approach that inspired Node 22.6.0's `--experimental-strip-types` functionality, released last month

  • UnusedJun 2026 · marketplace.visualstudio.com · ▲3

    A VS Code extension that detects dead code across a codebase

  • Unused CSS finder2018 · jitbit.com · ▲299

    Crawl your website and find unused CSS

More dev tools this month

the category →
  • /dev/null▲481

    a social network for devs

    Dev tools · 2d ago · dev-null.sh

  • open-source IDE for thoughtful software design. Contribute to devdotfast/whiteboard development by creating an account on GitHub.

    Dev tools · 27d ago · github.com

  • Contribute to reladraw/reladraw development by creating an account on GitHub.

    Dev tools · 25d ago · github.com

  • OpenBot▲362

    Grok Bot alternative: free, local, open-source, multiplayer

    Dev tools · 22d ago · openbot.run

  • Talanoa▲341

    Hi HN, I’m a fullstack developer, and honestly, I’ve lost count of how many side projects I’ve worked on over the years. But one idea kept coming back to me: a different kind of email client. It first came to me in 2014: “What if we could handle emails more like conversations?” Every year, I’d revisit this concept in my “Build Notes.” Ten years later, no one had built exactly what I had in mind — so I finally decided to do it myself. That’s how Talanoa was born. I wanted something focused on people, not timelines. I was tired of marking messages as unread just to remember to reply later, or…

    Dev tools · 20d ago · talanoa.email

  • CoreSpeed▲332

    One MCP for everything your agents need: apps, memory, tools

    Dev tools · 28d ago · corespeed.io

Source: Show HN post ↗

Launched alongside, September 2024

the whole month →
  • Wispr Flow▲2,732

    Speak naturally, write perfectly & 3x faster in every app

    AI · 2024 · wisprflow.ai

  • Pathway▲1,335

    Get user insights 10x faster

    Work · 2024 · wynde.io

  • Personalized AI daily planning that suits your life

    AI · 2024 · beforesunset.ai

  • Osmos▲1,194

    Match with like-minded professionals for 1:1 conversations

    Growth · 2024

  • Carrot Care▲1,168

    Understand & optimise your bloodwork

    Life & fun · 2024 · carrotcare.health

  • Polar▲1,167

    An open source monetization platform for developers

    Dev tools · 2024 · polar.sh