Skip to content

Comments

fix: create missing scripts/types/ TypeScript definitions and unblock from .gitignore#414

Merged
pethers merged 3 commits intostricttypingfrom
copilot/sub-pr-407-again
Feb 21, 2026
Merged

fix: create missing scripts/types/ TypeScript definitions and unblock from .gitignore#414
pethers merged 3 commits intostricttypingfrom
copilot/sub-pr-407-again

Conversation

Copy link
Contributor

Copilot AI commented Feb 21, 2026

npx tsc --project tsconfig.scripts.json --noEmit was failing with 80+ TS2307: Cannot find module './types/*.js' errors because the scripts/types/ directory was never committed — it was silently excluded by the types/ pattern in .gitignore.

Changes

.gitignore

  • Added !scripts/types/ negation so the directory is tracked by git

scripts/types/ — new type definition files

File Key exports
language.ts Language (14-language union)
article.ts ArticleData, ArticleType, ArticleCategory, GenerationResult, GeneratedArticle, MCPCallRecord, BreakingEventData, BreakingNewsOptions, BreakingNewsValidation
content.ts BreadcrumbLabels, FooterLabelSet, ContentLabelSet, CommitteeNameMap
editorial.ts EditorialPillar, PillarHeadings, LocalizedPillarHeadings
validation.ts StructureValidation, EveningAnalysisValidation, QualityResult, CrossRefValidationResult, BatchValidationResult, CISummary, RequiredToolsMap
mcp.ts MCPClientConfig, JsonRpcRequest/Response, search/filter param types, RiksdagDocument
workflow.ts WorkflowState, MCPCacheEntry, RecentArticleEntry, DuplicateCheckResult, WorkflowRecord
party.ts PartyCode, PartyVariantMap

Type fixes resolved alongside missing files

  • QualityResult — optional fields to accommodate the early-error return path in article-quality-enhancer.ts
  • RiksdagDocument — added dokumentnamn? and id? to fix '{}' not assignable to 'string' in mcp-client.ts
  • MCPCallRecord.result typed as unknown (not unknown[]) to match fetchVotingRecords return
  • ArticleType extended with 'breaking'; BreakingEventData/Options/Validation added to unblock news-types/breaking-news.ts and its tests

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits February 21, 2026 20:17
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
… gitignore

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copilot AI changed the title [WIP] Add evening analysis content validator for assessment quality fix: create missing scripts/types/ TypeScript definitions and unblock from .gitignore Feb 21, 2026
Copilot AI requested a review from pethers February 21, 2026 20:24
@pethers pethers marked this pull request as ready for review February 21, 2026 20:28
@pethers pethers merged commit a193c63 into stricttyping Feb 21, 2026
@pethers pethers deleted the copilot/sub-pr-407-again branch February 21, 2026 20:28
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