Skip to content

Turn on TypeScript strict mode - #530

Merged
jtklein merged 6 commits into
AntonelliLab:masterfrom
jtklein-agents:spec/406-strict-typescript
Nov 27, 2026
Merged

jtklein merged 6 commits into
AntonelliLab:masterfrom
jtklein-agents:spec/406-strict-typescript

Conversation

@jtklein-agents

Copy link
Copy Markdown
Contributor

Summary

Turns on TypeScript strict mode. Type-only: the app behaves as before.

 tsconfig.json
-  "strict": false,
-  "noImplicitAny": true,
-  "noImplicitThis": true,
-  "strictBindCallApply": true,
+  "strict": true,

Lands four reviewed child PRs (jtklein-agents/raxmlGUI #411–#414), in order:

strictFunctionTypes on            # generic OptionSelect<Value>, typed setValue
strictNullChecks fixes
├── parse result + store models   # late-set Alignment/Run fields are `| undefined`
└── main process + app files      # real narrowing; `!` only with a reason comment
"strict": true + tests under it   # tests use `{} as RunParent`

No new @ts-ignore / @ts-expect-error. Bugs strict mode exposed that change what the user sees are filed separately, not fixed here.

Evidence

  • Before (upstream/master, d740620): tsc --noEmit -p tsconfig.json --strict → 149 errors
    After (this branch merged onto upstream/master): tsc --noEmit -p tsconfig.json → 0 errors, with strict: true
  • Vitest on the merged tree: 74 files, 504 tests passed.

Merge Danger

Door: two-way

Revert restores the old tsconfig.json and code; nothing persisted changes.

Blast Radius: contributors

New code must now pass strict null and function-type checks, so open PRs against master may fail yarn typecheck until rebased and fixed. 63 files touched, so expect merge conflicts in src/app/store and src/main.

🤖 Generated with Claude Code

jtklein-agents and others added 6 commits November 27, 2026 14:29
processHelpers optional-chains the stdout/stderr pipes, modelSelection
throws explicitly on a missing best-model match (same catch, same user
message), paths falls back on pop(), bootstrap spreads instead of
[].concat. --strict errors: 149 -> 142, zero in these files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OptionSelect is generic over its value type, and every prop type that
embeds it names the real type. Handlers registered with ipcMain.handle
take IpcMainInvokeEvent. The unhandled-error bridge event has a typed
payload. Option gains an Input type parameter so part start and end
accept the text OptionTextField hands them.

Closes #407

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
typecheckAlignment returns a TypecheckedAlignment with dataType,
numSequences, fileFormat, hasInvariantSites and typecheckingComplete
required, and AlignmentParseResult carries it. Store fields that stay
undefined until load widen their readers' types; lookups that cannot
miss throw a plain Error. strict tsc: 149 -> 118 errors, none in the
touched non-test files.

Refs #408

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…412)

processHelpers optional-chains the stdout/stderr pipes, modelSelection
throws explicitly on a missing best-model match (same catch, same user
message), paths falls back on pop(), bootstrap spreads instead of
[].concat. --strict errors: 149 -> 142, zero in these files.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
tsconfig sets "strict": true and drops the flags it implies. Test files
use `!` where a lookup is known to hit; the null-parent Runs use
`{} as RunParent`. Strict surfaced a clash between the store's optional
hoverInfo and the option components' required one, and Input's
astralTree prop; both are loosened to match the store, with no runtime
change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-on-strict-mode

Strict tests and turn on strict mode
@jtklein
jtklein merged commit a146ed1 into AntonelliLab:master Nov 27, 2026
10 checks passed
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