ts-remove-unused is a command-line tool designed to help developers identify and eliminate unused code in TypeScript projects. It automatically detects and removes unused exports, deletes TypeScript modules without referenced exports, and offers a --check mode to report unused exports and deletable files without making changes. The tool relies on the project's tsconfig.json to determine the files to process and provides options to skip specific files or include .d.ts files. Developers can also use the JavaScript API to integrate ts-remove-unused into their workflows. The tool supports various export types, including variable declarations, function declarations, class declarations, interface declarations, type alias declarations, and default exports. It is recommended to use ts-remove-unused in a version-controlled environment to safely manage code modifications.
If the summary seems inacurate, just downvote and I'll try to delete the comment eventually 👍
fagnerbrack@reddit (OP)
Here's the summary:
ts-remove-unused is a command-line tool designed to help developers identify and eliminate unused code in TypeScript projects. It automatically detects and removes unused exports, deletes TypeScript modules without referenced exports, and offers a
--check
mode to report unused exports and deletable files without making changes. The tool relies on the project'stsconfig.json
to determine the files to process and provides options to skip specific files or include.d.ts
files. Developers can also use the JavaScript API to integrate ts-remove-unused into their workflows. The tool supports various export types, including variable declarations, function declarations, class declarations, interface declarations, type alias declarations, and default exports. It is recommended to use ts-remove-unused in a version-controlled environment to safely manage code modifications.If the summary seems inacurate, just downvote and I'll try to delete the comment eventually 👍
^(Click here for more info, I read all comments)