🏠 Inicio
Pruebas de rendimiento
📊 Todos los benchmarks 🦖 Dinosaurio v1 🦖 Dinosaurio v2 ✅ Aplicaciones To-Do List 🎨 Páginas libres creativas 🎯 FSACB - Showcase definitivo 🌍 Benchmark de traducción
Modelos
🏆 Top 10 modelos 🆓 Modelos gratuitos 📋 Todos los modelos ⚙️ Kilo Code
Recursos
💬 Biblioteca de prompts 📖 Glosario de IA 🔗 Enlaces útiles
advanced

Legacy Code Refactoring to TypeScript

#refactoring #typescript #architecture #solid-principles

Refactor a complex legacy module to modern TypeScript using SOLID principles.

Act as a Senior Software Architect. You are presented with a legacy module written in older JavaScript that suffers from tight coupling, global state reliance, and lack of error handling. Your task is to: 1. Rewrite the code using modern TypeScript features, specifically utilizing generics and utility types. 2. Refactor the structure to strictly adhere to SOLID principles, decoupling dependencies where necessary. 3. Implement robust error handling with custom error classes. 4. Add JSDoc comments for all public interfaces. 5. Provide a detailed diff-style explanation justifying the architectural choices made to improve maintainability and testability.