type ParserOptions = { lang: "ts" | "tsx" | "jsx" | "js" | "dts"; sourceType: "module" | "script" | "commonjs"; semanticErrors?: boolean; attachComments?: boolean; }; type ParserResult = { program: any; comments: unknown[]; diagnostics: Array<{ severity: string; message: string; start?: number | null; }>; }; export declare function getParserBackend(): Exclude | undefined; export declare function parseWithYukuBackend(source: string, options: ParserOptions): ParserResult; export declare function yukuLangFromPath(filePath: string): string | undefined; export declare function yukuSourceTypeFromPath(filePath: string): string | undefined; export interface SfcExtractResult { /** The extracted JS/TS source that can be fed to yuku-parser. */ scriptContent: string; /** The language hint to use ("ts" | "tsx" | "jsx" | "js"). */ lang: "ts" | "tsx" | "jsx" | "js"; /** True when a ` close tag. * 3. Pad the lines *before* the script block with empty lines so that * line numbers reported by the parser still correspond to the original file. * * Returns an `SfcExtractResult` with `hasScript = false` when no script block * is present (template-only components are valid and produce zero edges). */ export declare function extractSfcScript(source: string, filePath: string): SfcExtractResult; /** * Resolves the yuku-parser `lang` for any supported file extension, including * SFC formats. For SFC files the caller is expected to have already extracted * the script block and should pass the `lang` from `SfcExtractResult` instead. */ export declare function resolveParserLang(filePath: string): "ts" | "tsx" | "jsx" | "js" | "dts"; import type { ModuleRecord, Position, Range, ParserBackend as ParserBackendName } from "./types.js"; interface AstNode { type?: string; start?: number; end?: number; loc?: { start?: Position; end?: Position; }; [key: string]: unknown; } export declare function parseModule(sourceText: string, file: string, ignorePatterns?: string[]): ModuleRecord; export declare function getNodeRange(node: unknown): Range | undefined; export declare function getNodeType(node: unknown): string | undefined; export declare function getNodeProperty(node: unknown, property: string): unknown; export declare function getStringLiteral(node: unknown): string | undefined; export declare function getIdentifier(node: unknown): string | undefined; export declare function isAstNode(node: unknown): boolean; export declare function walkAst(node: unknown, visitor: (node: AstNode, stack: AstNode[]) => void): void; export type { AstNode };