mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-09-21 00:21:30 +00:00
Tighten three type boundaries that were previously papered over with
`as unknown as` casts:
* `CsharpResolveContext.allFilePaths`: `Set<string>` → `ReadonlySet<string>`.
The orchestrator only hands out a read-only view; drop the widening
cast at the resolver-adapter site.
* `resolveCsharpImportTarget`: call passes the narrow context directly.
`WorkspaceIndex` is `unknown` in the shared contract, so the
`as unknown as WorkspaceIndex` cast was gratuitous — structural
assignability covers it.
* `csharpMergeBindings`: drop unused `_scope: Scope` parameter. The
implementation never read it; the cast chain in `scope-resolver.ts`
existed only to satisfy an unused slot. LanguageProvider.mergeBindings
now wraps with a tiny arrow adapter; ScopeResolver.mergeBindings
passes through directly.
No runtime behavior change. `grep 'as unknown as' csharp/scope-resolver.ts`
returns zero matches.
Verified:
- npx tsc --noEmit clean
- C# unit + integration 462/462 passing (incl. Python integration)
|
||
|---|---|---|
| .. | ||
| csharp-captures.test.ts | ||
| csharp-hooks.test.ts | ||
| csharp-imports.test.ts | ||