TypeScript: calls through interface members (incl. prototype-installed mixins) produce no CALLS edge to the implementation
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- devtools
Research direction
Start by tracing the TypeScript LSP hybrid call resolution path for the lsp_ts_method strategy and how it handles interface member targets that are not graph nodes. Then inspect the graph relationships and module-level calls described in the issue to see how implementations and prototype-installed mixins can be found. Done means interface calls produce edges to implementation candidates, or at minimum retain a CALL_REFERENCE when unresolved; the issue names no test file, so locate the relevant resolver tests.
Written by the indexing model from the issue text.
Description
Bug/feature: TypeScript calls through interface members are not attributed to implementations
Version: codebase-memory-mcp v0.12.1 (linux-amd64-portable), TypeScript project, LSP hybrid resolution
(strategy: lsp_ts_method on edges). Related: #2893 (C#: calls through interfaces / virtual members not
attributed to implementers), #2789 (TypeScript call resolution fixes).
What happens
A method call on a parameter typed with an interface produces no CALLS edge at all. The LSP resolves the
call to the interface member signature, which is not a node, so the edge is dropped silently. trace_path
outbound of the caller therefore misses the real implementation.
Minimal example
// contract.ts
export interface RegistryOperations {
replaceCredential(providerId: string, raw: unknown): Promise<Snapshot>
}
// operations.ts
export const credentialOperations = {
replaceCredential(this: Registry, providerId: string, raw: unknown): Promise<Snapshot> { /* ... */ },
}
// registry.ts
import { credentialOperations } from './operations'
export class Registry { /* state */ }
export interface Registry extends RegistryOperations {}
installOperations(Registry.prototype, credentialOperations) // Object.assign-style mixin
// handler.ts
export async function replaceModelCredential(registry: Registry | undefined, providerId: string, req: Request) {
const input = await req.json()
return registry!.replaceCredential(providerId, input) // <- no CALLS edge
}
Observed:
trace_path(function_name="…replaceModelCredential", direction="outbound")listsreq.jsonstyle callees but
notreplaceCredential.MATCH (f)-[r]->(g) WHERE f.name='replaceModelCredential' RETURN type(r), g.name→ onlyUSAGE Registry
(the type), no call edge; noCALL_REFERENCEeither.- The implementation exists as a
Functionnode (operations.replaceCredential), the class has an
IMPLEMENTSedge toRegistryOperations, and the module-level callinstallOperations(Registry.prototype, …)
is captured as a Module → CALLS edge with its arguments.
Expected
When the LSP target is an interface member, resolve to the implementations: classes with IMPLEMENTS (or
declaration-merged classes of the same name) that define the method; if none, members installed on the
prototype by module-level Object.assign(X.prototype, obj) / mixin helpers (object-literal members of obj).
Several implementations → several edges with a lower confidence (or a candidates count), as the resolver
already does for other ambiguous strategies. At minimum, an unresolved call should leave a CALL_REFERENCE with
the member name so that consumers can resolve it themselves.
- Dominant language
- C
- Stars
- 45.8k
- Forks
- 3.8k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 108
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from DeusData/codebase-memory-mcp
-
bug ux/behavior
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
DeusData/codebase-memory-mcp#3191 ·
Maintainers usually reply within 1 day
-
documentation enhancement parsing/quality ux/behavior
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
DeusData/codebase-memory-mcp#3131 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
hook-augment: the five-row cap keeps the first five search_graph rows, so variables and modules displace function definitions (v0.12.1)Possibly taken A pull request linked to this issue is open or already merged. Openbug editor/integration parsing/quality ux/behavior
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
DeusData/codebase-memory-mcp#3062 · 2 comments ·
Maintainers usually reply within 1 day
-
bug documentation editor/integration parsing/quality
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
DeusData/codebase-memory-mcp#3050 · 1 comment ·
Maintainers usually reply within 1 day
-
editor/integration parsing/quality
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
DeusData/codebase-memory-mcp#2286 ·
Maintainers usually reply within 1 day
All issues in DeusData/codebase-memory-mcp
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NVIDIA/open-gpu-kernel-modules#1635 ·
Maintainers usually reply within 1 day
-
iOS: the "Edit controls" button never hides, even with a controller connected, and covers the gameOpengame: 010065A014024000 ios
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
seedds/nxnative#3714 · 1 comment ·
Maintainers usually reply within 2 days