Conversation
|
Thanks for tracking down both TS2677 root causes precisely — the |
…eline RerankProviderNodeRow was an interface without an index signature, so it could not satisfy Record<string, unknown> in the type predicate. Convert it to a type alias. Annotate the Antigravity catalog map callback as DynamicCatalogModel | null so the later `c is DynamicCatalogModel` filter stops tripping TS2677. Leave tests/unit/translator-openai-to-gemini.test.ts and config/quality/eslint-suppressions.json to diegosouzapw#14255, which types the assertions instead of raising the frozen any-count. Signed-off-by: Minxi Hou <houminxi@gmail.com>
8282809 to
2ddf98b
Compare
|
Dropped #14164 is still open and also touches Local: |
|
The two TS2677 errors targeted here were resolved in upstream commit Verified on the latest Since #14164 already landed the resolution, this PR is superseded. |
|
Thanks @HouMinXi — the two TS2677 errors this PR cleared from the API Route Typecheck baseline were already resolved on |
Summary
Two
TS2677errors made API Route Typecheck red onrelease/v3.8.51(tracked in #13866).RerankProviderNodeRowwas an interface without an index signature, so it could not be assigned toRecord<string, unknown>in the type predicate. Converted to a type alias insrc/app/api/v1/_shared/rerankProviderNodes.ts.The catalog
.map()return insrc/mitm/handlers/antigravity.tswas inferred as{ id, displayName, description?: string } | null. Annotated asDynamicCatalogModel | nulland spreaddescriptiononly when present.config/quality/eslint-suppressions.jsonis not in this PR. #14255 types the Gemini turn-pairing assertions instead of raising the frozen any-count from 74 to 87.#14164 also edits the two TypeScript files (a
NonNullable<typeof c>narrow). Whichever lands first, the other rebases.Verification
node scripts/check/check-api-typecheck.mjs: OK, 283 pre-existing, 0 newRelated to #13866. #13866 stays open.