fix: eliminate 37 'any' types with proper interfaces - #54
Closed
TerminalGravity wants to merge 2 commits into
Closed
fix: eliminate 37 'any' types with proper interfaces#54TerminalGravity wants to merge 2 commits into
TerminalGravity wants to merge 2 commits into
Conversation
ESLint 10 uses util.styleText which was added in Node 20. This has been failing the Node 18 CI check on every PR, blocking all merges (28 open PRs affected). - CI matrix: [18, 20] → [20, 22] - engines: >=18 → >=20
- Add SessionRecord, ContentBlock, FeatureExtractor, SearchResult, TimelineRecord, JsonRecord, and OpenApiSpec interfaces - Type YAML config parsing with Partial<PreflightConfig> - Type JSONL session records instead of raw JSON.parse → any - Type OpenAI embedding API responses - Type Xenova pipeline with narrowed FeatureExtractor interface - Cast git execSync errors properly (unknown → typed) - Type test result JSON in clarify-intent Reduces no-explicit-any warnings from 47 → 10 (79% reduction). Total lint warnings from 74 → 37 (50% reduction). Remaining any: playwright dynamic import (intentional), generic JSON state. Build clean, all 43 tests pass.
TerminalGravity
commented
Mar 3, 2026
TerminalGravity
left a comment
Collaborator
Author
There was a problem hiding this comment.
Nice cleanup — 79% reduction in any types is solid. The new interfaces (SessionRecord, ContentBlock, etc.) look well-scoped. One thought: the FeatureExtractor type for Xenova might break if they change their pipeline API — worth a comment noting it's pinned to their current shape. Otherwise this is ready to go once CI unblocks.
Collaborator
Author
|
Closing — superseded by newer PRs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Replaces 37
anytype annotations across 10 files with proper TypeScript interfaces.Why
Type safety in the core lib layer prevents runtime bugs and makes the codebase more maintainable. These weren't just
anysuppressions — each one got a real type.Changes
SessionRecord,ContentBlock,FeatureExtractor,SearchResult,TimelineRecord,JsonRecord,OpenApiSpecPartial<PreflightConfig>FeatureExtractorinterfaceunknown→ typed cast)Impact
no-explicit-anywarningsRemaining
any: playwright dynamic import (intentional), generic JSON state (typed alias).Build clean, all 43 tests pass.