fix(extraction): extract type refs from TS interface property and method signatures (#432)

Types that appeared only in TypeScript interface members — property
signatures like `value?: Partial<IPage>` and method signatures like
`fetchPage(arg: IPage): IOrderField` — were not being captured at
extraction time, so the resolver never built `references` edges for
them. `codegraph_impact`/`codegraph_callers` on the named type missed
every consumer that imported it solely to use it in an interface shape.

Add a `property_signature` / `method_signature` branch in `visitNode`:
when inside a class-like node (which covers interfaces) and the
language supports type annotations, call `extractTypeAnnotations` with
the parent (interface) node ID as the edge source. No property/method
node is created — only unresolved references that the resolver wires
the same way it wires field and parameter type references elsewhere.
This commit is contained in:
TheSunn
2026-05-26 17:01:45 -05:00
committed by GitHub
parent 2543ae565a
commit 7e0d9b9ec0
3 changed files with 58 additions and 0 deletions
+10
View File
@@ -196,6 +196,16 @@ and adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
`docs/design/mixed-ios-and-react-native-bridging.md`.
### Fixed
- **TypeScript interface members now produce `references` edges to their
annotated types (#432).** Types that appeared only in an interface's
property or method signatures — e.g. `value?: Partial<IPage>` or
`fetchPage(arg: IPage): IOrderField` — were being silently dropped at
extraction time, so `codegraph_impact`/`codegraph_callers` on the named
type missed every consumer that imported it just to use it in an
interface shape. The walker now extracts type annotations from both
`property_signature` and `method_signature` nodes inside class-like
parents (interfaces, classes), and the resolver wires the resulting
references the same way it wires field and parameter types elsewhere.
- **Git worktrees no longer silently borrow another tree's index (#155).**
When a worktree is nested inside the main checkout — exactly what agent
tools that place worktrees under gitignored paths like