/** * Validation error aggregation system for schema analysis * * This module provides types and utilities for collecting validation errors * during schema analysis and reporting them together, allowing users to fix * multiple issues in one pass. */ /** @internal */ export type ValidationSeverity = 'error' | 'warning'; /** @internal */ export interface ValidationError { /** * The entity name where the error occurred */ entity: string; /** * The field name where the error occurred (optional for entity-level errors) */ field?: string; /** * Human-readable error message */ message: string; /** * Optional hint on how to fix the error */ fix?: string; /** * Severity of the validation error (default: 'error') * - 'error': Blocking error that prevents code generation * - 'warning': Non-blocking issue that should be addressed */ severity?: ValidationSeverity; } /** @internal */ export declare class SchemaValidationError extends Error { readonly errors: ValidationError[]; readonly warnings: ValidationError[]; constructor(errors: ValidationError[]); } /** @internal */ export declare class ValidationErrorCollector { private errors; /** * Add a validation error or warning to the collection */ addError(error: ValidationError): void; /** * Check if any blocking errors have been collected (excludes warnings) */ hasErrors(): boolean; /** * Check if any issues (errors or warnings) have been collected */ hasIssues(): boolean; /** * Get the count of blocking errors collected (excludes warnings) */ getErrorCount(): number; /** * Get all collected errors and warnings */ getErrors(): ValidationError[]; /** * Throw a SchemaValidationError if any blocking errors were collected * Warnings alone will not cause this to throw */ throwIfErrors(): void; } //# sourceMappingURL=validation-errors.d.ts.map