/** * The diagnostics brain: TDC source text → LSP diagnostics. * * Pure and dependency-free (beyond our own parser/validator): given the * current document text, parse it and validate the resulting tree, then map * every finding to an LSP diagnostic. This is exactly the parse+validate * pass the `TDC` library runs before rendering, minus the throw — an editor * wants to SHOW errors live, not fail. * * Pack scanning is NOT done here (it walks the filesystem — too expensive * per keystroke). The server scans packs once and passes their addresses in * via `packAddresses`, so a `template` referencing a loaded pack is not * flagged as unknown. Pack-file problems belong on the pack files, not on * the document being edited, so they are intentionally omitted. */ import type { DataSourceOptions } from '../data-source/index.js'; import type { LspDiagnostic } from './types.js'; export interface DiagnosticsContext { /** Dotted addresses of loaded data packs — accepted as valid templates. */ readonly packAddresses?: readonly string[]; /** Base dir / data paths for resolving ``. */ readonly dataSources?: DataSourceOptions; } export declare function computeDiagnostics(text: string, ctx?: DiagnosticsContext): LspDiagnostic[]; //# sourceMappingURL=diagnostics.d.ts.map