Skip to content

[Bug]: TypeScript object type aliases omit properties with function types #5525

Done

Description

@rvitaliy

Pre-flight checks

  • I have checked the Troubleshooting section in the README

Graphify extracts a method node for read(): number in an object type alias, as fixed in #5455. A property whose declared type is a function, such as read: () => number, still has no member node or calls edge when called through a typed receiver.

This affects contract navigation in a TypeScript monorepo. For example, an injected provider can expose operations as function-typed properties in a Readonly alias. Searching for callers of one of those operations then misses calls through the provider.

Environment

Graphify v0.9.121 / v8 at 0f22ae76, tree-sitter-typescript 0.23.2, Python 3.14.6 on macOS arm64.

Minimal reproduction

Save the following as port.ts in an empty directory.

export type FilePort = Readonly<{
  list(): number;
  read: () => number;
}>;

export function usePort(port: FilePort): number {
  return port.list() + port.read();
}

Run graphify extract . --code-only --no-cluster. Inspect the member and call edges in the resulting graph.

python - <<'PY'
import json
from pathlib import Path

graph = json.loads(Path("graphify-out/graph.json").read_text())
labels = {node["id"]: node["label"] for node in graph["nodes"]}
for edge in graph["edges"]:
    if edge["relation"] in {"method", "calls"}:
        print(labels[edge["source"]], edge["relation"], labels[edge["target"]])
PY

Expected behavior

FilePort has member nodes for both .list() and .read(), with locations on the corresponding declarations. The graph has a calls edge from usePort() to each member.

Actual behavior

The graph contains .list() and its call. It omits .read() and the call to it.

Activity

  1. github-actions commented on Nov 26, 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.

  2. added a commit that references this issue on Nov 28, 2026
    859f56e
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