Forem

Corey Alexander
Corey Alexander Subscriber

Posted on • Originally published at coreyja.com on

Cleaning up unused Typescript Files with `ts-prune`

TLDR: npx ts-prune will find us-used files in your Typescript project!


Recently at work I had some extra time on Friday. Not enough that I wanted to start a big task, but enough time to do some cleanup.

I found ts-prune which looks through a TypeScript project and finds things that are unused. It helped me find things that were completely unused and could be cleaned up, and some types there were being exported from their file but didn't need to be!

ts-prune is in maintenance mode, but I found it to work well for my usecase!

One caveat is that it just prints the files with errors to stdout, I had to go fix the issues manually. But well worth it for a more cleaned up repo!

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay