Convert a large JavaScript codebase to TypeScript in one automated pass, producing a fully compiling project with placeholder types to refine incrementally.
Run the re-ignore pass to clean up lingering @ts-expect-error suppression comments after engineers have improved type annotations.
Customize the migration pipeline with your own plugins to handle codebase-specific patterns the default transformation misses.
Adopt a TypeScript migration strategy used in production by Airbnb on their large React codebase.
| airbnb/ts-migrate | 0xgf/boneyard | softprops/action-gh-release | |
|---|---|---|---|
| Stars | 5,613 | 5,615 | 5,611 |
| Language | TypeScript | TypeScript | TypeScript |
| Setup difficulty | moderate | easy | easy |
| Complexity | 3/5 | 2/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Works on existing JavaScript projects, the output compiles but contains loosely typed any placeholders and suppression comments that require manual cleanup over time.
ts-migrate is a tool from Airbnb that automates the first step of converting a JavaScript codebase to TypeScript. TypeScript is a stricter version of JavaScript that catches certain bugs before the code runs by requiring you to declare what types of data each variable holds. Migrating a large existing JavaScript project to TypeScript by hand can take a very long time, and ts-migrate is designed to speed that up. The tool takes a JavaScript project as input and outputs a TypeScript project that compiles without errors. It does this by adding TypeScript file extensions and inserting placeholder type annotations wherever the types cannot be inferred automatically. Many of those placeholders are either the loosely typed any annotation or a suppression comment like @ts-expect-error. The resulting project builds successfully, but the type annotations are not precise. The intention is that engineers then go through the codebase over time and replace the placeholders with accurate types, which is a much smaller job than doing the full migration manually. The tool is built as a set of plugins, each handling a specific transformation step. These plugins are combined into migration configurations, so teams can customize the process for their own codebase rather than applying a fixed one-size-fits-all transformation. The repository ships two default configurations: one for the main JavaScript-to-TypeScript migration and one for a re-ignore pass that cleans up suppression comments. Airbnb published a blog post describing how they used this tool to migrate their own large codebase. The tool is released as open source under the MIT license.
A tool from Airbnb that automates converting a JavaScript codebase to TypeScript by inserting placeholder type annotations, giving you a compiling project on day one that engineers can refine incrementally.
Mainly TypeScript. The stack also includes TypeScript, Node.js.
Free to use for any purpose, including commercially, as long as you keep the copyright notice.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.