DEV Community

Mitch Lamers
Mitch Lamers

Posted on

TS: Remove dead code

Quick tip for anyone that wants to clean up unused Typescript code.

In your project folder run:

npm install ts-prune -g

Followed by:

ts-prune

You now get an overview of code that is not used, it still has a few issues when using barrel imports (index.ts files) so make sure to double check references using VSCode or your favourite editor before removing code.

Happy cleaning! for more info see: https://github.com/nadeesha/ts-prune

Top comments (0)