Skip to content
CodeMorph

Download CodeMorph (Beta)

Free to download. Sign in for CodeMorph AI, or bring your own API key.

Release notes only. Unsubscribe in one click.

Review

Every change, a diff you approve.

CodeMorph saves a checkpoint of your project before any change. Each converted file arrives as a side-by-side diff with a short explanation of what changed and why, and you review it one file at a time. If you want everything back, one click on Undo all restores your project byte for byte.

Download CodeMorph (Beta)

Free to download. Sign in for CodeMorph AI, or bring your own API key.

Release notes only. Unsubscribe in one click.

Read the review guide
The diff of one converted file: removed JavaScript lines in red on the left, the added TypeScript interface and types in green on the right, and Accept, Reject and Edit in the panel.

The loop

Review at the speed of the migration

Files arrive in plan order, so you review utilities before the models that use them, and every decision informs the next.

  1. 01

    Open the diff

    Your JavaScript on the left, the TypeScript on the right, with additions highlighted.
  2. 02

    Read the summary

    from Morph
    For example: cart.ts inferred CartItem and Cart from 14 call sites. Typecheck passes with strict mode.
  3. 03

    Accept or reject

    Accept keeps the file and moves you to the next one. Reject restores the original.
  4. 04

    Verify the whole

    Ctrl+Shift+V
    Run the type-check across the project before you commit.

What a good diff looks like

Boring, on purpose

Types added from real usage, module syntax modernized where it's safe, and no logic changes.

Before
// cart.js
const { db } = require("../lib/db");

async function addToCart(userId, item) {
  const cart = await db.cart.find(userId);
  cart.items.push(item);
  return db.cart.save(userId, cart);
}

module.exports = { addToCart };
After
// cart.ts
import { db } from "../lib/db";

export interface CartItem { sku: string; qty: number; price: number }
export interface Cart { items: CartItem[] }

export async function addToCart(userId: string, item: CartItem): Promise<Cart> {
  const cart = await db.cart.find(userId);
  cart.items.push(item);
  return db.cart.save(userId, cart);
}

Details

Built for careful engineers

File states

Every file in a run is marked accepted, review or queued, so you always know what's left.

Checkpoint and Undo all

CodeMorph saves a checkpoint of your project before any change. One click on Undo all restores it byte for byte.

Ask before you accept

Ask why a type was chosen and Morph answers with the call sites behind it.

Reject is free

Rejecting restores the original file exactly. Nothing is lost.

No hidden any

Files that can't be typed cleanly stay in review with their diagnostics instead of being forced through.

Normal changes

Accepted files are ordinary changes in your working tree. Commit them the way you always do.

Anatomy

What's on the review screen

Everything you need to make a decision, without leaving the editor.

Diff headerThe file pair being reviewed, for example cart.js to cart.ts, its position in the batch and the lines added and removed.
Accept and RejectTop right of the diff. Accept keeps the TypeScript; Reject restores the original JavaScript.
Side-by-side viewOriginal on the left, converted on the right, with added and changed lines highlighted.
InstructionThe instruction that started the run, pinned at the top of the Morph panel, such as strict mode or one folder.
SummaryWhat Morph inferred for this file and from how many call sites, and whether typecheck passes.
File listEvery file in the run with its state: accepted, review or queued.
ConfirmationAfter you accept, a short note names the file and the next one in line.

Checklist

What to look for in each diff

Most files take seconds. These are the things worth a second look.

Exported types

Do the new interfaces describe what callers really pass? These types spread to every importer.

Optional fields

A field marked optional means some call site doesn't provide it. Check that's intended, not a bug the types just revealed.

Union types

string | undefined or number | string often point at inconsistent callers worth cleaning up later.

Module syntax

require turned into import is usually right, but config files loaded by tools may need to stay CommonJS.

Unchanged logic

Conversions should only add types and modernize syntax. Any behavioral change is a reason to reject.

Remaining any

Files in review list their remaining diagnostics. Decide whether to type them by hand.

Workflow

From accepted files to a merged pull request

  1. 01

    Accept the batch

    Work through each file in the batch until the list shows every file accepted.
  2. 02

    Run & Verify

    Ctrl+Shift+V
    Typecheck, tests and build across the whole project. Fix or reject anything that fails.
  3. 03

    Commit

    Accepted files are ordinary changes. Review them in Source Control and commit with a message like “migrate batch 1: lib and utils”.
  4. 04

    Open a pull request

    One pull request per batch keeps reviews small. Teammates review the TypeScript like any other change.
  5. 05

    Continue up the graph

    The next batch is typed against what you just merged, so each pull request builds on verified code.

Rejecting

When to say no

Rejecting is cheap and nothing is lost. Good reasons to reject:

  • · The conversion changed behavior, not just types.
  • · A type is technically valid but wrong for your domain, for example a string where you have a known set of values.
  • · You'd rather restructure the file before typing it, such as splitting a module that does too much.
  • · A tool or framework expects this file to stay JavaScript.

After rejecting, type the file yourself. Either way, the rest of the plan carries on.

FAQ

Questions about review

Do I have to review every file?
Review is per file so nothing slips in unseen. Small, verified utility files usually take seconds; your attention goes where the summaries flag something interesting.
Can I edit a file before accepting it?
Yes. It's your editor: change anything you like, then accept and verify.
What happens to files I reject?
They're restored to the original JavaScript. Type them yourself, and the rest of the plan carries on.
Can I accept a whole batch at once?
Review is per file by design, so every change is seen. Verified utility files usually take seconds each.
Where do accepted changes go?
Into your working tree, as normal file changes. Commit and push them the way you always do.
Can teammates review the migration?
Yes. Commit each batch and open a pull request, and your team reviews the TypeScript in your usual code review tool.
Does Morph remember why it made each change?
Yes. Ask Morph about a file and it answers from the change it made, with the call sites behind it.
What if I accept something by mistake?
It's an ordinary change in your working tree, so you can revert it with Source Control or git like any other edit. To put everything back at once, use Undo all, which restores the checkpoint saved before any change, byte for byte.

Review your first migration.

Download the beta, open a project and see your migration plan in under a minute.

Download CodeMorph (Beta)

Free to download. Sign in for CodeMorph AI, or bring your own API key.

Release notes only. Unsubscribe in one click.

Read the docs

Free plan, no card needed. Pro is $20 a month. Founding price $12 a month for the first 100.