/**
 * How a single-file component's script joins the component — shared by the
 * Vue, Svelte and Astro extractors, which hand each `<script>` block (or
 * Astro's frontmatter) to the TypeScript extractor and fold its result back.
 *
 * The fold used to keep the block's own file node and make the component
 * contain it AND every node in the block, so the hierarchy ran file-inside-
 * component and every member had two parents: the Symbol view listed a
 * component's script twice, with the component and its file among its own
 * members. And everything the block did at its top level stayed on that file
 * node — but `<script setup>`, a Svelte instance script and Astro's
 * frontmatter run once per component instance, so their top-level calls ARE
 * the component's doing: a Nuxt page's `useAsyncData(…)`, a Svelte page's
 * `onMount(…)`. With them on the file, a walk from the component found
 * nothing, and the viewer's Steps tab drew a screen alone.
 *
 * Now: the SFC has one file node, the whole file, holding the component; what
 * the block holds at its top level the component holds, and a nested symbol
 * keeps its own parent; a per-instance block's top-level calls and references
 * — a top-level constant's initializer's included — are the component's,
 * while its imports, and everything a module-level block does, stay with the
 * file.
 */
import type { Edge, ExtractionError, ExtractionResult, Language, Node, UnresolvedReference } from '../types';
/** The SFC's own file node — the whole file, as the tree-sitter extractor makes one. */
export declare function sfcFileNode(filePath: string, source: string, language: Language): Node;
export interface ScriptFold {
    filePath: string;
    componentNodeId: string;
    /** Lines before the block in the SFC file: the block's line 1 is `lineOffset + 1`. */
    lineOffset: number;
    language: Language;
    /** The block runs once per component instance — Vue `<script setup>`, a Svelte instance script, Astro frontmatter. */
    perInstance: boolean;
}
export interface ScriptSink {
    nodes: Node[];
    edges: Edge[];
    unresolvedReferences: UnresolvedReference[];
    errors: ExtractionError[];
}
export declare function foldScriptResult(result: ExtractionResult, fold: ScriptFold, sink: ScriptSink): void;
//# sourceMappingURL=sfc-script.d.ts.map