Legacy Function Refactoring & SOLID Compliance Prompt
Refactor complex legacy code structures into single-responsibility, performant, and clean functions using Copilot suggestions.
// Act as a senior software architect. Analyze and refactor the legacy function provided below to follow clean code standards.
// Refactoring Targets:
// 1. Single Responsibility Principle (SRP): Split massive routines into small utility functions.
// 2. DRY (Don't Repeat Yourself): Consolidate duplicate structures.
// 3. Type Safety: Ensure strict TypeScript typings, interfaces, and guards.
// 4. Performance: Improve loop processing, search complexity, and async actions.
// Legacy Code:
[Paste Legacy Code Here]💡 How to Use This Prompt
Copy the prompt above and paste it directly into GitHub Copilot or your preferred AI model. Replace any bracketed placeholders [ ] with your specific task inputs.
Was This Helpful?
Help us improve by rating this resource.
Share This Resource
Share with your team and social networks.