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:
| Step | Command | Pass condition |
|---|---|---|
| Typecheck | tsc --noEmit | 0 errors, using your tsconfig.json |
| Test suite | npm test | your test command succeeds |
| Build | npm run build | your build script succeeds |
Not "it compiles", not a confidence score. Every check, every time.
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:
- Typecheck · tsc --noEmit, then the error count, for example 0 errors.
- Test suite · npm test, then the result, for example 48 passed.
- 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:
- Baseline. Before anything changes, CodeMorph measures how many type errors your JavaScript already has, with
tsc --checkJs. - Convert. A batch of files is converted, each typed against dependencies that are already TypeScript.
- Type-check the project. Not just the new files, so a change that breaks a file elsewhere is caught immediately.
- Repair. If
tscreports 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. - 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
testandbuildscripts from yourpackage.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.