Skip to content

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

Merged
colbymchenry merged 2 commits into
colbymchenry:mainfrom
TheKenS:fix_type_annotation
May 26, 2026
Merged

fix(extraction): extract type refs from TS interface property and method signatures#432
colbymchenry merged 2 commits into
colbymchenry:mainfrom
TheKenS:fix_type_annotation

Conversation

@TheKenS
Copy link
Copy Markdown
Contributor

@TheKenS TheKenS commented May 26, 2026

…type annotations

Types that appear only in interface property signatures (e.g. value?: Partial<IPage>) were not producing UnresolvedReferences, so the resolver never built references edges for them. Impact analysis consequently missed files that import-type only these interface-property types.

Add a property_signature branch in visitNode: when inside a class-like node (includes interfaces) and the language supports type annotations, call extractTypeAnnotations with the parent (interface) node ID as the edge source. No property node is created — only unresolved references.

…type annotations

Types that appear only in interface property signatures (e.g.
`value?: Partial<IPage>`) were not producing UnresolvedReferences,
so the resolver never built `references` edges for them. Impact
analysis consequently missed files that import-type only these
interface-property types.

Add a `property_signature` branch in `visitNode`: when inside a
class-like node (includes interfaces) and the language supports type
annotations, call `extractTypeAnnotations` with the parent (interface)
node ID as the edge source. No property node is created — only
unresolved references.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
method_signature inside interfaces (e.g. `foo(arg: T): R`) had the same
root cause as the property_signature case fixed here — interface-body
type annotations were dropped because the walker matched neither
propertyTypes nor fieldTypes, so extractTypeRefsFromSubtree was never
called for those members. Extend the dispatch to both node types and
add a matching test.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@colbymchenry colbymchenry changed the title fix(extraction): extract type refs from interface property_signature … fix(extraction): extract type refs from TS interface property and method signatures May 26, 2026
@colbymchenry colbymchenry merged commit 7e0d9b9 into colbymchenry:main May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants