mirror of
https://github.com/koala73/worldmonitor.git
synced 2026-04-26 01:24:59 +02:00
fix(simulation): add TypeScript types for simulation pipeline + remove dead legacy fallbacks (#2414)
- Add scripts/seed-forecasts.types.d.ts with ambient interfaces for all
simulation data structures (CandidatePacket, TheaterResult, SimulationOutcome,
ExpandedPath, SimulationEvidence, SimulationAdjustmentDetail)
- Add // @ts-check + @param JSDoc to contradictsPremise, negatesDisruption,
computeSimulationAdjustment, applySimulationMerge
- Add scripts/jsconfig.json to enable tsc --checkJs on seed-forecasts.mjs
- Remove dead legacy fallbacks candidatePacket?.topBucketId and
candidatePacket?.topChannel (these fields were never at top level in
production; the correct path is candidatePacket.marketContext.topBucketId).
TypeScript now enforces this at write time.
- Update all test fixtures to use marketContext: { topBucketId, topChannel }
shape, matching production CandidatePacket structure
This commit is contained in:
15
scripts/jsconfig.json
Normal file
15
scripts/jsconfig.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"checkJs": true,
|
||||
"strict": false,
|
||||
"noImplicitAny": false,
|
||||
"target": "ES2022",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"allowJs": true,
|
||||
"maxNodeModuleJsDepth": 0,
|
||||
"skipLibCheck": true
|
||||
},
|
||||
"include": ["seed-forecasts.mjs", "seed-forecasts.types.d.ts"],
|
||||
"exclude": []
|
||||
}
|
||||
Reference in New Issue
Block a user