Runtime diagnostics reference
Configure render traces, hydration mismatch reports, strict CI failures, and DOM runtime tuning.
Diagnostic options
Apply these process-wide development settings with .
tsimport { configureDevDiagnostics } from "@tavojs/core/dev";
configureDevDiagnostics({
enabled: true,
devMode: true,
strictHydration: true,
onHydrationMismatch(event) {
console.error(event.kind, event.path, event.recovery);
},
});| API / option | Type | Default | Behavior |
|---|---|---|---|
enabled | boolean | false | Enables trace delivery when an onTrace callback exists. |
devMode | boolean | false | Collects mismatch details and enables console/overlay development reporting. |
onTrace | callback | null | null | Receives mount, patch, and hydrate events. |
onHydrationMismatch | callback | null | null | Receives expected/found values, DOM path, phase, kind, and recovery mode. |
onError | callback | null | null | Receives runtime errors instead of the console fallback. |
strictHydration | boolean | false | Throws TAVO_HYDRATION_001 on the first mismatch, suitable for CI/browser tests. |
Recovery is reported as text replacement, subtree replacement, or extra-node cleanup. Fix the first mismatch rather than suppressing later symptoms.
Use the DOM runtime defaults
Normal applications use the renderer defaults. DOM reconciliation tuning is not part of the public application API; use stable keys and fix hydration mismatches reported by the diagnostics hooks.
Look up exact public types
Follow linked API names to their canonical TypeScript declarations and package boundaries.