module-by-module-migration
Installation
SKILL.md
Convert Module by Module Up Your Dependency Graph
Overview
When migrating JavaScript to TypeScript, follow the dependency graph: start with leaf modules (those with no dependencies) and work upward. This ensures that when you convert a module, all its dependencies are already typed. This minimizes type errors and makes migration manageable.
When to Use This Skill
- Migrating large codebases to TypeScript
- Converting JavaScript to TypeScript
- Managing dependencies during migration
- Planning migration order
- Teams adopting TypeScript
The Iron Rule
Migrate modules starting from leaves (no dependencies) and work up the dependency graph. This ensures dependencies are typed before dependents.