also exported from index.ts
(options: AnalyzeOptions): Promise<AnalyzeResultJson> import {analyze} from 'svelte-docinfo/analyze.js'; Analyze library source files and extract metadata (one-shot).
Wraps a single-use AnalysisSession. For repeated analyses of the same source set (e.g., a Vite plugin reacting to file edits), use createAnalysisSession directly.
options
returns
Promise<AnalyzeResultJson>
analyzed modules (sorted alphabetically) + concatenated ingest + query diagnostics
throws
Error- if `sourceOptions` validation fails or the tsconfig is missing or can't be loaded (see `loadTsconfig`; `tsconfig: false` skips it). Also propagates `onDuplicates: 'throw'` errors.