Skip to content

Conversation

@krishpranav
Copy link

PR Description:

Fixes #30039

This PR introduces an exciting new feature that automatically renames both the file and the corresponding function/class names in TypeScript projects, improving the refactoring experience! 🎉

Key Features:

  • Automatic File Renaming: Renames the file and updates all related exports (functions, classes, and arrow functions) accordingly. 🔄
  • Import Path Updates: Automatically adjusts import paths in other files to reflect the renamed file and its exports. 🔧
  • Support for Multiple Export Types: Handles named exports, default exports, and arrow functions seamlessly. 🔑
  • Comprehensive Test Coverage: Includes tests that ensure the functionality works for various use cases, ensuring smooth refactoring. ✅

🛠️ How It Works:

  • Renames functions, classes, and files while updating the imports.
  • Applies to default and named exports.
  • Ensures consistent renaming across the codebase, reducing the need for manual intervention. ✂️

🚀 Additional Info:

@krishpranav
Copy link
Author

@microsoft-github-policy-service agree

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

Status: Not started

Development

Successfully merging this pull request may close these issues.

Refactor rename file + rename function

1 participant