malv validate
Run TypeScript validation across all apps in your project. This catches type errors without building.
Usage
malv validate
What It Does
The command runs tsc --noEmit on each app defined in your malv.json. This type-checks your code without producing output files.
Output
$ malv validate
Validating apps...
✓ @my-org/notes
✓ @my-org/auth
✗ @my-org/email (3 errors)
@my-org/email:
src/tools/send_email.ts:15:5 - error TS2345: Argument of type 'string' is not assignable to parameter of type 'number'.
src/tools/send_email.ts:23:10 - error TS2339: Property 'foo' does not exist on type 'EmailInput'.
src/tools/list_emails.ts:8:3 - error TS7006: Parameter 'x' implicitly has an 'any' type.
Validation failed: 1 app with errors
Exit Codes
| Code | Meaning |
|---|---|
| 0 | All apps pass validation |
| 1 | One or more apps have type errors |
This makes malv validate suitable for CI/CD pipelines:
malv validate || exit 1
Parallel Validation
Apps are validated in parallel for speed. Error output is collected and displayed grouped by app.
When to Use
Before committing
Run validation to catch type errors early:
malv validate && git commit -m "feat: add new feature"
In CI/CD
Add to your pipeline to prevent merging broken code:
- name: Type check
run: malv validate
Debugging build failures
If malv build fails, run malv validate first to see if it's a type error:
malv validate
# Fix any errors shown
malv build
Scope
Validation runs on all apps in malv.json with local sources:
workspace:*apps - validatedworkspace:pathapps - validated./pathapps - validated- Registry apps (semver versions) - skipped (already built)
Related Commands
- malv build - Build apps (includes type checking)
- malv dev - Development server (shows errors in console)