If you are migrating to TypeScript it may be nice to keep track of how you are doing for a particular project, here is an example of using Tokei and jq to do this.
You can install both via Homebrew
brew install jqbrew install tokei
Run this in the root of your project.
Use -e to exlude any files you don't want to count
tokei -e styles.js -o json | jq '100 * .inner.TypeScript.code / (.inner.JavaScript.code + .inner.TypeScript.code)'
Credits to https://github.com/lili2311