Skip to content

Type the run options - #265

Merged
jtklein-agents merged 2 commits into
spec/236-page-typescriptfrom
244-typescript-run-options
Nov 17, 2026
Merged

jtklein-agents merged 2 commits into
spec/236-page-typescriptfrom
244-typescript-run-options

Conversation

@jtklein-agents

Copy link
Copy Markdown
Owner

Closes #244. Part of #236.

Summary

src/app/store/
├── RunOptions.js  →  RunOptions.ts   # R100 rename, then typing commit
└── Run.ts                            # analysisOption return type; 5 option fields annotated
-export class Binary extends Option {
-  constructor( run ) {
+export class Binary extends Option<string, RunOwner> {
+  constructor( run: RunOwner ) {
  • One module-local RunOwner interface holds only what the file reads from the run.
  • No subclass redeclares a base field.
  • window.rendererBridge is read with no cast, inside each method.
  • @types/d3-array added as a dev dependency.
  • Run.ts: analysisOption returns the exported AnalysisChoice. binary, substitutionMatrix, substitutionI, substitutionAscertainment and startingTree get explicit types, otherwise tsc reports circular-initializer implicit any.
  • BinaryInfo.multithreaded is optional, since the Win7 ModelTest entry omits it (widened type, no behaviour change).

Evidence

  • Before: RunOptions.js untyped, so every option was Option<unknown, unknown>.
    After: tsc and tsc --noImplicitAny report no diagnostics in .ts files. yarn lint passes, yarn react-test passes (66 suites, 474 tests), yarn typecheck:baseline passes (no baseline edits needed), yarn build passes.
  • No bug exposed by typing, so no follow-up issue.

Merge Danger

Door: two-way

Blast Radius: page store typing only; no runtime change. The .js to .ts rename affects any outside fixed-path reader, and none was found.

jtklein-agents and others added 2 commits November 17, 2026 12:04
Each option subclass states its value type through Option<Value, Owner>,
with one module-local RunOwner interface. Adds @types/d3-array.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@jtklein-agents
jtklein-agents merged commit 8ab652e into spec/236-page-typescript Nov 17, 2026
14 of 16 checks passed
@jtklein-agents jtklein-agents mentioned this pull request Nov 17, 2026
12 tasks
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.

1 participant