/** * Receiver-bound CALLS / ACCESSES emit pass — generic 7-case * dispatcher consuming `ScopeResolver` for the language-specific bits * (super recognizer, field-fallback toggle). * * **Contract Invariant I4 — case order is load-bearing.** The cases * are evaluated in this order; the FIRST that emits an edge wins: * * 1. **super branch** — `provider.isSuperReceiver(receiverName)` → * MRO walk skipping self * 2. **Case 0 (compound)** — receiver has `.` or `(` → compound resolver * 3. **Case 1 (namespace)** — receiver in `namespaceTargets` → exported def * 4. **Case 2 (class-name / static receiver)** — receiver resolves to a * class-like binding (Class/Interface/Struct/Record/Enum/Trait) → MRO * walk on that class. Also handles static-style invocations * (`ILogger.Warn(...)`) with kind-aware reason/confidence for * read/write ACCESSES. * 5. **Case 3 (dotted typeBinding for namespace prefix)** — * `typeRef.rawName` like `models.User` * 6. **Case 3b (chain-typebinding)** — `typeRef.rawName` has a dot * but not a namespace prefix → compound resolver * 7. **Case 4 (simple typeBinding)** — `typeRef.rawName` has no dot → * MRO walk + `findOwnedMember` * 8. **Case 5 (value-receiver bridge)** — receiver is a `Const`/`Variable` * whose `nodeId` is referenced as an `ownerId` in `model.methods` * (object-literal services). Last-resort fallback for lowercase * receivers with no class-like or type-binding match. Mirrors * the legacy DAG bridge in `call-processor.ts`. * * Reordering or merging cases changes resolution semantics. * * **Contract Invariant I5 — pre-seeding `seen` is forbidden.** The * orchestrator runs this pass FIRST (before `emitReferencesViaLookup`) * and consumes the populated `handledSites` set. Pre-seeding `seen` * from the shared resolver's emissions (an old optimization) actively * suppresses correct emissions for sites the shared resolver also * resolved to a wrong target. */ import type { ParsedFile } from '../../../../_shared/index.js'; import type { KnowledgeGraph } from '../../../graph/types.js'; import type { ScopeResolutionIndexes } from '../../model/scope-resolution-indexes.js'; import type { SemanticModel } from '../../model/semantic-model.js'; import type { ScopeResolver } from '../contract/scope-resolver.js'; import type { GraphNodeLookup } from '../graph-bridge/node-lookup.js'; import type { WorkspaceResolutionIndex } from '../workspace-index.js'; import type { ResolutionOutcomeRecorder } from '../resolution-outcome.js'; /** Subset of `ScopeResolver` consumed by this pass. Accepting the * subset rather than the full provider keeps tests and partial * refactors lighter — callers only need to populate what we read. */ type ReceiverBoundProviderSubset = Pick; export declare function emitReceiverBoundCalls(graph: KnowledgeGraph, scopes: ScopeResolutionIndexes, parsedFiles: readonly ParsedFile[], nodeLookup: GraphNodeLookup, handledSites: Set, provider: ReceiverBoundProviderSubset, index: WorkspaceResolutionIndex, model: SemanticModel, options?: { readonly recordResolutionOutcome?: ResolutionOutcomeRecorder; }): number; /** * Sentinel returned by `pickOverload` when narrowing leaves >1 candidate * sharing identical normalized parameter-types. Callers should suppress * the CALLS edge AND mark the site as handled so `emitReferencesViaLookup` * does not re-emit from the pre-resolved reference index. See * `pickOverload` JSDoc for the upstream cause (per-language normalizer * collapses distinct types in arity-metadata). */ export declare const OVERLOAD_AMBIGUOUS: unique symbol; export {};