Skip to content

Comments

fix: TypeScript compilation errors in generate-news-enhanced.ts#437

Merged
pethers merged 2 commits intonews-generation/weekly-review-2026-02-22-25732d3df5a3d00ffrom
copilot/sub-pr-433
Feb 22, 2026
Merged

fix: TypeScript compilation errors in generate-news-enhanced.ts#437
pethers merged 2 commits intonews-generation/weekly-review-2026-02-22-25732d3df5a3d00ffrom
copilot/sub-pr-433

Conversation

Copy link
Contributor

Copilot AI commented Feb 22, 2026

tsc --project tsconfig.scripts.json --noEmit emitted 4 errors due to type mismatches introduced in the week-ahead generation and breaking news wiring.

Changes

  • scripts/generate-news-enhanced.ts: Import RawDocument from data-transformers.js; narrow documents declaration from unknown[]RawDocument[] to satisfy generateArticleContent, extractWatchPoints, and generateMetadata parameter constraints
  • scripts/types/article.ts: Widen BreakingNewsOptions.writeArticle return type from Promise<void>Promise<void | boolean> — consistent with the same signature in month-ahead, monthly-review, and weekly-review modules, and matching the local writeArticle function that returns Promise<boolean>
// Before — incompatible
writeArticle?: ((html: string, filename: string) => Promise<void>) | null;

// After — matches local writeArticle(): Promise<boolean>
writeArticle?: ((html: string, filename: string) => Promise<void | boolean>) | null;

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI changed the title [WIP] Update weekly review for Feb 15-22 2026 parliamentary activity fix: TypeScript compilation errors in generate-news-enhanced.ts Feb 22, 2026
Copilot AI requested a review from pethers February 22, 2026 15:10
@pethers pethers marked this pull request as ready for review February 22, 2026 15:16
@pethers pethers merged commit 38bad70 into news-generation/weekly-review-2026-02-22-25732d3df5a3d00f Feb 22, 2026
@pethers pethers deleted the copilot/sub-pr-433 branch February 22, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants