Large projects developed and maintained long term often face growing codebase complexity and size. While this may be inevitable to handle the added features and changing requirements, many parts of the codebase may be actually unused and have no effect in the final output or the behavior of the application.
It's important to remove unused code as it results in increased cognitive load with negative impact for readability. You might end up spending more time in development to modify unused parts of your codebase.
Increase of unused code is a common issue seen across large-scale projects. However, the task of removing unused code is quite tedious. TypeScript Remove (tsr) is a command line tool that helps you to remove unused code by detecting unused code and automatically editing source files.
In most projects, code execution begins from an entry file. For example, let's consider a project where src/main.ts serves as the entry point and has a single module dependency, src/utils.ts.