allowjs-mixing
Installation
SKILL.md
Use allowJs to Mix TypeScript and JavaScript
Overview
Migrating a large JavaScript codebase to TypeScript doesn't have to be all-or-nothing. The allowJs compiler option lets you gradually adopt TypeScript by mixing .ts and .js files in the same project. This enables incremental migration, allowing teams to convert files one at a time while maintaining a working codebase.
This approach is essential for large migrations where a big-bang rewrite isn't feasible.
When to Use This Skill
- Migrating JavaScript projects to TypeScript
- Gradually adopting TypeScript in a JS codebase
- Working with mixed TypeScript/JavaScript teams
- Converting large existing projects
- Teams still learning TypeScript
The Iron Rule
Use allowJs to enable incremental migration. Convert files module by module, starting from leaf modules and working up the dependency graph.