Conversation
Fixes TS2835 (missing .js extension) and TS5097 (.ts extension) errors in test files and src/test-preload.ts under --moduleResolution node16.
Fixes TS7034/7005 (contexts array in bench-rerank.ts), TS18046 (body casts in cli.test.ts and mcp.test.ts), TS7006 (item in llm.test.ts), and TS2532 (non-null assertion in multi-collection-filter.test.ts).
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
npx tsc --noEmiton main currently reports 51 errors, almost all in test files. This brings it to 3 with zero behavior change: type annotations, import-specifier extensions, and narrowing only. No tsconfig, package.json, or runtime logic touched..jsextensions ESM resolution wants (14 missing, 7 written as.ts), matching the convention the rest of the codebase already uses.RerankDocumentResultannotation.unknownnarrows onres.json()in cli/mcp tests, 2 typed locals insrc/bench-rerank.ts(annotation only), 1 non-null assert after a length assertion.The 3 left
migrate-schema.tsandsrc/test-preload.ts:bun:sqlite/bun:testhave no installed types. Adding@types/bunto devDependencies would clear both; left out since it touches package.json, happy to add it here if you want.src/bench-rerank.ts: passingflashAttentionintocreateRankingContextis runtime-intentional (the catch block probes for support and recovers), and the installed node-llama-cpp typings do not declare it. Typing around it would change what the bench exercises, so it stays.Why
Every open PR rebases onto this baseline; with the noise gone, a new red
tscline means the PR actually introduced it (#663's branch, for example, currently carries 6 new ones that are invisible against the 51).Tests
Fast subset (no local models): 200/200 pass, twice (independent reruns). Baseline comparison on main showed the same single pre-existing model-dependent timeout in
mcp.test.tsbefore and after.