jscodeshift typescript codemod example
MIT License
Example usage of jscodeshift for TypeScript with TypeScript:
Strongly typed code and code completion with @types/jscodeshift
npm i
or
yarn
npx jscodeshift -t ./examples/simple-rename.ts --extensions=ts --parser=ts './**/*.ts' --print --dry
Omit
--dry
to write the transformed source back to disk.
npm test
or
yarn test
Use the pre-configured VSCode launcher to run tests and debug your transformer.
Use @babel/parser
in https://astexplorer.net when working with the jscodeshift's default parser (default: babel
).