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.

Esc
  • No results: ""

Review and accept diffs

Every converted file arrives as a side-by-side diff. Accept it, reject it, or ask Morph why before you decide.

CodeMorph's rule is simple: every change is checkpointed, reviewed per file, and reversible. Every converted file becomes a diff, and you decide what stays.

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.
A side-by-side diff with Accept, Reject and Edit

How review works

  1. A checkpoint comes first. Before any change, CodeMorph saves a checkpoint of your project. One click on Undo all restores it byte for byte.
  2. Each file opens as a diff. Your JavaScript on the left, the TypeScript on the right, with additions highlighted.
  3. Morph explains the change. The panel summarizes what it did, for example cart.ts: inferred CartItem and Cart from 14 call sites. Typecheck passes with strict mode.
  4. Accept or reject. Accept keeps the file. Reject restores the original. A short confirmation names the file and the next one in line, such as cart.ts accepted · next: orders.ts.

File states

The Morph panel lists every file in the current run with its state:

StateMeaning
acceptedYou approved it. The TypeScript version is in your working tree.
reviewConverted and waiting for your decision.
queuedNot converted yet.

What a good diff looks like

A migration diff should be boring. Expect to see:

  • .js renamed to .ts, or .jsx to .tsx.
  • Parameter and return types added from real usage.
  • interface or type declarations for objects that cross module boundaries.
  • require() and module.exports converted to import and export where it's safe.

What you shouldn't see is logic changes. Conversions are meant to preserve behavior exactly, and Verify type-checks the whole project. Running your tests and build is coming soon, so run them yourself.

Ask before you accept

Not sure why a parameter became string | undefined? Open the Ask tab and ask. Morph knows every change it made and why, and answers with the call sites that drove the decision, for example orders.ts:42.

Files that need you

If a file can't pass tsc after a few repair attempts, CodeMorph won't force it through with any. It leaves the file in review with the remaining diagnostics, so you can fix it by hand or ask Morph for help.

Committing

Accepted files are ordinary changes in your working tree. Review them in Source Control (Ctrl Shift G) and commit the way you always do.

Something unclear or out of date? Tell us.