Skip to content

[Bug]: TypeScript calls through destructured methods of typed parameters are missing #5611

Done

Description

@rvitaliy

What happened?

When a function destructures methods from an explicitly typed parameter and calls the local bindings, Graphify can index the methods and still omit the call edges. This makes reverse impact queries miss callbacks invoked through a typed object.

Steps to reproduce

Save this as owner.ts in an empty directory and run graphify extract . --code-only --no-cluster.

interface ReadOwner {
  commitQueries(): void;
  retire(): void;
}

export function install(owner: ReadOwner) {
  const { commitQueries: commitReadQueries, retire: finishRetirement } = owner;
  queueMicrotask(() => commitReadQueries());
  finishRetirement();
}

Graph output

The two methods on ReadOwner appear in the graph. The calls edges from install() to those declarations are missing. Replacing the two invocations with owner.commitQueries() and owner.retire() yields both edges. The destructured calls should yield the same inferred targets at their original call sites.

Environment

Reproduced on v8 at 5d962d2d (0.9.123), macOS arm64, Python 3.14.10, from a clean extraction.

Related to #5586 and #5530, which cover calls through typed properties and typed receiver aliases.

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