ts-morph-refactor - TypeScript Refactoring with ts-morph
Perform safe AST-based TypeScript refactoring operations across a codebase using ts-morph executable scripts.
Tags
Updated: 2026-09-24Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Rename symbols across codebase
- Move declarations between files
- Propagate interface changes to classes
- Add method stubs to implementations
- Rename parameters across matching signatures
- Set return types for methods
- Organize and clean up imports
- Extract code into new function
- Add or modify interface properties
Inputs
- tsconfig.json file path
- TypeScript source files
- Script command arguments
Outputs
- Updated TypeScript source files
- Refactored code declarations and imports
Requirements
- ts-morph package
- tsx script runner
- Node.js environment
