Logo

dev-resources.site

for different kinds of informations.

Cleaning up unused Typescript Files with `ts-prune`

Published at
7/31/2023
Categories
todayilearned
javascript
ts
Author
coreyja
Categories
3 categories in total
todayilearned
open
javascript
open
ts
open
Author
7 person written this
coreyja
open
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!

ts Article's
30 articles in total
Favicon
How to improve the Frontend part of the project using one button as an example :))))
Favicon
Azure App Service doesn't returned compressed (gzip) files for Angular application?
Favicon
Deploying a Simple Static Website on AWS with CDK and TypeScript
Favicon
Understanding Next.js and TypeScript Tutorial
Favicon
🛠️📚 Classes with TypeScript - a cheat sheet
Favicon
Event Loop in 2 Minutes
Favicon
How Boring It Is to Write Articles or Talk to Certain Types of Developers These Days.
Favicon
How ts-pattern can improve your code readability?
Favicon
isNaN vs Number.isNaN
Favicon
🛠️ 📦 TypeScript Generics - a cheat sheet
Favicon
TypeScript Generics: How to Write Flexible and Type-Safe Code
Favicon
Introduction to TypeScript
Favicon
Dominando os Utility Types do TypeScript
Favicon
Nega aynan Vue.js ?
Favicon
TS-BoilerplateX
Favicon
What Are Standalone Components Angular 17 ?
Favicon
Navigating the JS TS Limbo
Favicon
Demystifying TypeScript Generics with Simple Examples
Favicon
Typescript enum vs. "as const"
Favicon
Mastering TypeScript: A Comprehensive Tutorial
Favicon
m3u8 to mp4 with merged audio
Favicon
Shouldn't an NPM package that helps hundreds of thousands of programmers increase their productivity tenfold be open-sourced?
Favicon
ChatGPT: how I used it to convert HTTP requests to OpenAPI document
Favicon
Cleaning up unused Typescript Files with `ts-prune`
Favicon
Intern's Guide Chat GPT Full Stack: Nest, React, Typescript
Favicon
Using LiteFS with Bun on Fly.io
Favicon
Know your users' location in React Ts
Favicon
Regex #1: Understanding Regex, Regex-Based String Methods and Regex Flags
Favicon
The Witcher Card Game Live
Favicon
Powerful File System manager for Nodejs

Featured ones: