Skip to content
CodeMorph
Esc
  • No results for ""

Verify

What "verified" means in CodeMorph, how Run & Verify checks your whole project, and how the repair loop works.

A migration is verified when all three checks pass across the whole project:

StepCommandPass condition
Typechecktsc --noEmit0 errors, using your tsconfig.json
Test suitenpm testyour test command succeeds
Buildnpm run buildyour build script succeeds

Not "it compiles", not a confidence score. Every check, every time.

tsc and the test suite verifying the result

Run & Verify

Open the Verify tab in Morph, or press Ctrl Shift V from anywhere. Run & Verify checks the whole project, not just the changed files, and shows each step as it runs:

  1. Typecheck · tsc --noEmit, then the error count, for example 0 errors.
  2. Test suite · npm test, then the result, for example 48 passed.
  3. Build · npm run build, then ok.

When everything passes, you'll see Migration verified with your typed-file count and strictness, for example 38/38 files typed · strict mode.

The repair loop

Verification also runs during a migration, so problems are caught batch by batch rather than at the end:

  1. Baseline. Before anything changes, CodeMorph measures how many type errors your JavaScript already has, with tsc --checkJs.
  2. Convert. A batch of files is converted, each typed against dependencies that are already TypeScript.
  3. Type-check the project. Not just the new files, so a change that breaks a file elsewhere is caught immediately.
  4. Repair. If tsc reports errors, the exact diagnostics go back to the model for another attempt, a bounded number of times. The output panel shows the repair count per file.
  5. Hand off. Files that still fail stay in review with their diagnostics, instead of being forced through with any.

Your toolchain, as-is

  • TypeScript config. Verify uses your tsconfig.json, including its strictness. Ask Morph for strict mode and it migrates to that bar.
  • Scripts. The test and build steps run the test and build scripts from your package.json, so Jest, Vitest, Vite, Next.js and others work unchanged.
  • Locally. Everything runs on your machine against your real dependencies. Run npm install (or your package manager's equivalent) first.

If a step fails

  • Typecheck errors. Click through to the file, or ask Morph about the error in the Ask tab.
  • Test failures. The failing tests are listed. A conversion that changed behavior is a bug: reject the file, or ask Morph to fix it.
  • No tests or no build script. That step is skipped and CodeMorph says so, rather than implying a guarantee it can't give.

Tip

Your baseline error count is a good measure of how much a migration will catch. On an untyped codebase it's often in the thousands.

Something unclear or out of date? Tell us.