Generic array to square bracket array transformer
This is a jscodeshift transformer that converts TypeScript arrays that look like this:
Array<T>
To ones that look like this:
T[]
How to Use
yarn global add jscodeshift
- Copy
transform.js
down to your local machine. - Invoke jscodeshift with the transformer like so
jscodeshift -t ~/path/to/typescript-generic-array-to-square-brackets/transform.js --extensions=ts --parser=ts src/
- Profit!