Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add Auto Rename File and Function Refactor Support #60957

Closed
wants to merge 1 commit into from

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

@krishpranav krishpranav closed this by deleting the head repository Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Not started
Development

Successfully merging this pull request may close these issues.

Refactor rename file + rename function
1 participant