/** * Problem reporter shared by all checkers. * * Two responsibilities: * 1. Filter warnings when `includeWarnings` is `false`. * 2. Short-circuit after `maxProblems` is reached. * * The reporter does not sort or dedupe — checkers are expected to emit at * most one problem per logical issue. Callers get problems in encounter * order, which is stable across runs for the same input. */ import type { OoxmlProblemKind, OoxmlProblemSeverity, OoxmlValidationProblem } from "./types.js"; export interface ReporterOptions { maxProblems?: number; includeWarnings?: boolean; } export declare class Reporter { readonly problems: OoxmlValidationProblem[]; private errorCount; private readonly maxProblems?; private readonly includeWarnings; constructor(options?: ReporterOptions); /** * `true` once the configured `maxProblems` cap is reached. Checkers * should consult this at the top of their per-part loops to avoid * doing unnecessary work. */ get capped(): boolean; get hasErrors(): boolean; /** Report an error-severity problem. */ error(kind: OoxmlProblemKind, message: string, file?: string): void; /** Report a warning-severity problem. Only recorded if includeWarnings. */ warning(kind: OoxmlProblemKind, message: string, file?: string): void; private push; } /** * Convenience alias for the legacy `severity` argument used in the old * flat API. Kept for internal checker code that wants to produce a * problem with a runtime-chosen severity. */ export declare function reportWithSeverity(reporter: Reporter, severity: OoxmlProblemSeverity, kind: OoxmlProblemKind, message: string, file?: string): void;