Skip to content

Strict tests and turn on strict mode - #414

Merged
jtklein-agents merged 1 commit into
spec/406-strict-typescriptfrom
410-strict-tests-and-turn-on-strict-mode
Nov 27, 2026
Merged

jtklein-agents merged 1 commit into
spec/406-strict-typescriptfrom
410-strict-tests-and-turn-on-strict-mode

Conversation

@jtklein-agents

Copy link
Copy Markdown
Owner

Closes #410

Summary

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

Tests: ! where a lookup is known to hit, let x!: T for callbacks assigned later, [] as string[] in CheckOutputResult stubs. The null-parent Runs become {} as RunParent (none reaches onError). No @ts-ignore / @ts-expect-error added.

Strict also flagged two app types that disagreed with the store. Both are type-only, with no runtime change:

 OptionCheck / OptionSelect / OptionTextField / AlignmentCard
-  hoverInfo: string;
+  hoverInfo?: string;          // store's Option.hoverInfo is optional; only feeds title=

 Input
-  astralTree: CardAstralTree;
+  astralTree: CardAstralTree | null | undefined;
-  run.inputIsTree && run.hasAstralTree ? <AstralTreeCard …/>
+  run.inputIsTree && run.astralTree ? <AstralTreeCard …/>   // hasAstralTree === !!astralTree

Evidence

  • Before: "strict": true → tsc --noEmit reports 106 errors in 26 files (4 in App.tsx, the rest in tests and src/test/).
    After: tsc --noEmit exits 0. yarn verify passes: lint, typecheck, 73 test files / 499 tests.

Merge Danger

Door: two-way

Revert the one tsconfig line, and the rest is harmless !s.

Blast Radius: contributors

New code must now type-check under full strict mode. App behaviour is unchanged.

🤖 Generated with Claude Code

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>
@jtklein-agents
jtklein-agents merged commit 3e0b987 into spec/406-strict-typescript Nov 27, 2026
4 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.

1 participant