import type { DiagnosticCategory, DiagnosticPhase, DiagnosticSeverity } from '../types.js'; export interface RelatedLocation { readonly message: string; readonly file: string; readonly line?: number; readonly column?: number; } export interface DiagnosticFix { readonly description: string; readonly suggestions?: readonly string[]; } export interface Diagnostic { readonly phase: DiagnosticPhase; readonly category: DiagnosticCategory; readonly severity: DiagnosticSeverity; readonly code: string; readonly message: string; readonly file: string; readonly line?: number; readonly column?: number; readonly endLine?: number; readonly endColumn?: number; readonly constructKind?: string; readonly constructId?: string; readonly related?: readonly RelatedLocation[]; readonly fix?: DiagnosticFix; } /** * Accumulator for diagnostics across compiler phases. * Maintains deterministic ordering: by file, then line, then column. */ export declare class DiagnosticBag { private readonly items; add(d: Diagnostic): void; get all(): readonly Diagnostic[]; get errors(): readonly Diagnostic[]; get warnings(): readonly Diagnostic[]; get hasErrors(): boolean; /** Merge all diagnostics from another bag into this one. */ merge(other: DiagnosticBag): void; /** Return diagnostics in deterministic order (file → line → column). */ sorted(): readonly Diagnostic[]; } //# sourceMappingURL=diagnostic.d.ts.map