/** * TypeScript/JavaScript symbol extraction using the TypeScript Compiler API. * * We traverse the AST and collect: * - classes, interfaces, enums, type aliases → class|interface|enum|type * - functions and methods → function|method * - const/let/var declarations → const|let|var * - property/accessor declarations → property * * The `id` field on each Symbol is always 0 — the caller is responsible for * assigning unique ids during insertion. */ import type { FileSymbols, SymbolLang } from './schema.js'; interface ParseOptions { file: string; content: string; lang: SymbolLang; } /** * Parse a TypeScript/JavaScript source file and extract all code symbols. * * The returned `Symbol.id` field is always `0` — the caller is responsible * for assigning unique numeric ids during bulk insertion. * * Returns an empty array for files that can't be parsed or contain no symbols. * * Async because the TypeScript compiler is loaded on first use — see * {@link loadTypescript}. The load is memoized, so only the first call to this * function in a process pays for it. */ export declare function parseSymbols(opts: ParseOptions): Promise; /** Detect SymbolLang from a file path — re-exported from the central map. */ export { detectLang } from './languages.js'; //# sourceMappingURL=ts-parser.d.ts.map