Skip to content

AST extraction: Svelte 5 script blocks and TypeScript export type * produce partial graphs #3942

Closed

Description

@noxlovette

Version

graphify 0.9.72 (uv tool upgrade graphifyy reports Nothing to upgrade), Python 3.10, macOS.

Minimal reproduction

index.ts:

export type * from "./types.js";

types.ts:

export type FetchFn = typeof globalThis.fetch;

Example.svelte:

<script lang="ts">
  let { value = 0 }: { value?: number } = $props();
  const doubled = $derived(value * 2);
  function increment() { value += 1; }
</script>
<button onclick={increment}>{doubled}</button>

Run structural extraction using graphify.extract.extract([Path("index.ts"), Path("Example.svelte")], parallel=False) or a code-only extraction.

Observed

The TypeScript barrel reports a syntax error on export type * and no symbols. Svelte files report syntax errors at <script> (line 1), and larger Svelte 5 templates can emit spurious if() function nodes from markup. On our application the health warning listed 175 partially extracted files, mostly Svelte, plus unresolved barrel symbols. Named type exports (or removal of unused type re-exports) avoid the barrel error, but not Svelte template errors.

Expected

Support TS 5 type-star exports. Parse Svelte script blocks as TS/JS and Svelte markup with a compatible grammar, preserving original source locations; template {#if} blocks must not become functions. Parser gaps should be clearly recorded in the graph/report, since they skew cohesion and hub rankings.

Activity

  1. github-actions commented on Sep 30, 2026

    @github-actions

    Thanks for opening this issue, @noxlovette. 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. safishamsi commented on Oct 10, 2026

    @safishamsi
    Member

    TS export type * shipped in 0.9.85 via #4303 (thanks @ayushcodes10); the Svelte 5 script-block part shipped earlier via #3984. Closing as resolved.

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