Typecheck tests against current types

tsx runs tests without type checking and tsconfig.json covers only src,
so 71 type errors had accumulated unnoticed. tsconfig.tests.json now
checks every test and helper, and npm run typecheck includes it.

Fixtures gain the fields the DTOs have grown since they were written
(manualQuantity, circuit apparent power/cos phi, downstream board loads,
section totals, building, cover and board info fields). Repository
lookups that return "row ?? null" now declare the null in their type,
which their callers already handle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Julian Appel 2026-10-29 13:17:45 +01:00
parent a8cc7eca5e
commit 7222398628
37 changed files with 166 additions and 56 deletions

View file

@ -602,6 +602,8 @@ Oberfläche: `/projects/:projectId/grobbilanz`. Details:
- `npm run db:backup` erzeugt ein konsistentes und verifiziertes Online-Backup.
- `npm run typecheck:scripts` prüft die TypeScript-Wartungsskripte, ohne Code zu
erzeugen.
- `npm run typecheck:tests` prüft alle Tests und Testhilfen gegen die aktuellen
Typen; `tsx` führt Tests sonst ohne Typprüfung aus.
- Die Baseline ersetzt alle vorigen Entwicklungsmigrationen. Datenbanken,
Snapshots und persistierte Commands aus Vor-Baseline-Ständen werden bewusst
nicht unterstützt. Ab der ersten veröffentlichten Version sind angewendete

View file

@ -82,6 +82,7 @@ npm test
npm run build:api
npm run build:web
npm run typecheck:scripts
npm run typecheck:tests
npx tsc --noEmit -p tsconfig.next.json
git diff --check
```