Skip to content

[Bug]: TypeScript calls through explicitly typed properties are missing #5585

Done

Description

@rvitaliy

What happened?

Graphify omits the call edge for a TypeScript method invoked through an explicitly typed property, such as deps.port!.inspect(). The graph already contains the Port.inspect declaration. I expected an inferred call edge from run to that member, with the location of the call site.

Steps to reproduce

Save this as example.ts in an otherwise empty directory:

interface Port {
  inspect(): number;
}

type Dependencies = Readonly<{ port?: Port }>;

export function run(deps: Dependencies) {
  return deps.port!.inspect();
}

Run graphify extract . --code-only --no-cluster and inspect the calls edges in graphify-out/graph.json. The graph contains both declarations. The only edge to .inspect() is its ownership edge from Port.

This also affects dependency objects whose type is imported and narrowed with a literal-key Pick. In a pnpm workspace, I saw calls from an API route to its application interface go missing when the interface was imported through a package barrel.

Environment

Reproduced from v8 at a7295bcaafb6ba003629dc7103178263d571f306 on macOS arm64 with Python 3.14.10, using a Git checkout and uv.

Related to #5529 and #5530, which cover calls through a local alias of the property (e.g. const port = deps.port; port.inspect()).

Activity

  1. github-actions commented on Nov 28, 2026

    @github-actions

    Thanks for opening this issue, @rvitaliy. A maintainer will take a look soon.

    If you would like to discuss it in real time, come say hi on our Discord server. For longer-form questions and ideas there is also GitHub Discussions.

    To help us triage, please make sure the report includes what you expected, what actually happened, and the steps (and a small sample) to reproduce it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions