Scrum4Me/lib/insights
Janpeter Visser a11b4709a7
fix(insights): narrow Sprint.completed_at to Date in velocity.ts (#56)
Vercel build was failing with TS18047 — `sprint.completed_at` is
possibly `null`. The earlier `.filter(s => s.completed_at != null)`
runtime-filtered the nulls out but did NOT narrow the element type;
TypeScript still saw `Date | null` on the result.

Add a user-defined type guard `(s): s is SprintWithCompletedAt =>` so
the narrowed array carries `completed_at: Date`. No runtime change.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 20:21:30 +02:00
..
agent-throughput.ts Agent throughput: jobs per dag stacked bar + KPI-strip (#49) 2026-05-02 16:30:06 +02:00
backlog-health.ts feat(insights): add getBacklogHealth helper — stuck tasks + missing AC/plan counts (#48) 2026-05-02 16:17:03 +02:00
burndown.ts feat: getBurndownData helper + computeBurndownDays (lib/insights/burndown.ts) (#34) 2026-05-01 16:41:12 +02:00
sprint-status.ts Component: SprintStatusDonut (Recharts PieChart) (#36) 2026-05-01 16:41:18 +02:00
velocity.ts fix(insights): narrow Sprint.completed_at to Date in velocity.ts (#56) 2026-05-02 20:21:30 +02:00
verify-stats.ts feat(insights): port unique files from closed bundle-PRs (#41) 2026-05-01 16:44:53 +02:00