by stringham · 9y ago · 0 comments
I've started writing small scripts using the TypeScript parser as a library to make meaningful improvements in our codebase. Since JavaScript is valid TypeScript syntax the scripts work on both.
For example, I wrote a small script to change var to let or const when possible. It uses the AST to check scoping rules and to check if a variable is ever reassigned.
Writing scripts like this is way more effective than doing it by hand.
No comments yet.