Skip to content

TypeScript 'export type * from' makes the whole file parse to no symbols #2474

Closed

Description

@gavinwilliams

Version: codegraph 1.6.2, macOS arm64 (bundled runtime)

What happens

codegraph init warns:

packages/sdk/src/index.ts: parse produced no symbols (tree has errors) — the file is indexed but contributes nothing to the graph

The file is a barrel:

export { FooClient, FooApiError, type FooClientOptions } from "./client.js";
export { DAYS_OF_WEEK } from "./types.js";
export type * from "./types.js";

export type * from "..." is TypeScript 5.0 syntax. The parse error drops the whole file, including the valid re-exports above it, so imports through the barrel don't resolve.

Minimal repro: a fresh repo whose src/index.ts is only export type * from "./types.js"; gives the same warning; removing that line from the barrel above makes it go away.

Expected

export type * from parses, or failing that only that statement is skipped and the other re-exports still produce edges.

Activity

  1. colbymchenry commented on Oct 23, 2026

    @colbymchenry
    Owner

    Thanks for the clear report and the minimal repro!

    The TypeScript grammar CodeGraph bundles has no rule for TypeScript 5.0's export type * from (upstream's doesn't either), so the line came out as a parse error. #2837 is merged to main and now reads it as the export * it is to the graph. A barrel like yours no longer reports "parse produced no symbols" or shows up in codegraph status as unparsed.

    The error only ever covered that one line, so the barrel's other re-exports were still read. Names imported through it already link to their declarations on main via #1955 and #2526.

    It all ships in the next release; re-index after upgrading to clear the stored warning.

  2. added a commit that references this issue on Oct 23, 2026
    cf3e6bc
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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions