whatisgithub

What is ts-migrate?

airbnb/ts-migrate — explained in plain English

Analysis updated 2026-06-26

5,613TypeScriptAudience · developerComplexity · 3/5LicenseSetup · moderate

In one sentence

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.

Mindmap

mindmap
  root((ts-migrate))
    What it does
      JS to TS migration
      Inserts type placeholders
      Produces compiling code
    Approach
      Plugin-based pipeline
      Customizable configs
      Re-ignore cleanup pass
    Output
      TypeScript extensions
      any placeholders
      ts-expect-error comments
    Audience
      Engineering teams
      Large JS codebases
    License
      MIT open source
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Convert a large JavaScript codebase to TypeScript in one automated pass, producing a fully compiling project with placeholder types to refine incrementally.

USE CASE 2

Run the re-ignore pass to clean up lingering @ts-expect-error suppression comments after engineers have improved type annotations.

USE CASE 3

Customize the migration pipeline with your own plugins to handle codebase-specific patterns the default transformation misses.

USE CASE 4

Adopt a TypeScript migration strategy used in production by Airbnb on their large React codebase.

What is it built with?

TypeScriptNode.js

How does it compare?

airbnb/ts-migrate0xgf/boneyardsoftprops/action-gh-release
Stars5,6135,6155,611
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderateeasyeasy
Complexity3/52/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Works on existing JavaScript projects, the output compiles but contains loosely typed any placeholders and suppression comments that require manual cleanup over time.

Free to use for any purpose, including commercially, as long as you keep the copyright notice.

So what is it?

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.

Copy-paste prompts

Prompt 1
I have a large JavaScript React project. Walk me through running ts-migrate on it: the install command, the migration command, and what I should do with all the any placeholders and ts-expect-error comments it inserts.
Prompt 2
Write a custom ts-migrate plugin that detects React PropTypes declarations and replaces them with TypeScript interface definitions during the migration pass.
Prompt 3
After running ts-migrate on my codebase I have hundreds of @ts-expect-error comments. Show me how to run the re-ignore pass and then replace them systematically with real types in small pull requests.

Frequently asked questions

What is ts-migrate?

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.

What language is ts-migrate written in?

Mainly TypeScript. The stack also includes TypeScript, Node.js.

What license does ts-migrate use?

Free to use for any purpose, including commercially, as long as you keep the copyright notice.

How hard is ts-migrate to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is ts-migrate for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.