/** * The **Import Validator** — inspects a parsed {@link Workbook} (and the derived * header row) *before* any data reaches the grid, so problems are surfaced as * friendly, actionable messages instead of being silently swallowed or blowing * up mid-render. * * Validation is split into two phases so the pipeline can fail fast: * - {@link ImportValidator.validateWorkbook} — structural checks on the raw * workbook (empty workbook, no data rows, ragged rows). * - {@link ImportValidator.validateHeaders} — header-level checks once the * header row is known (blank headers, duplicate headers). * * Formula-level validation (malformed expressions, circular references) is * intentionally **not** re-implemented here: those are detected authoritatively * by the Formula Engine when the rows are registered (a bad formula stores as * `#ERROR!`, a cycle as `#CIRC!`). Duplicating that logic would violate the * single-source-of-truth rule. * * @packageDocumentation */ import { type ImportValidationIssue, type ImportValidationResult } from '../../../types/import.types'; import type { WorkbookSheet } from '../model/workbook'; /** Stateless workbook / header validation. */ export declare class ImportValidator { /** * Combines a set of issues into a result, computing {@link ImportValidationResult.valid}. * * @param issues - All issues discovered across phases. * @returns The aggregated result. */ static toResult(issues: readonly ImportValidationIssue[]): ImportValidationResult; /** * Structural validation of the chosen sheet. * * @param sheet - The sheet to import, or `undefined` when the workbook was empty. * @param hasHeaderRow - Whether the first row is a header row. * @returns The issues found (may be empty). */ static validateWorkbook(sheet: WorkbookSheet | undefined, hasHeaderRow: boolean): ImportValidationIssue[]; /** * Header-level validation once the header row has been resolved. * * @param headers - The resolved header strings, in column order. * @returns The issues found (may be empty). */ static validateHeaders(headers: readonly string[]): ImportValidationIssue[]; } //# sourceMappingURL=import-validator.d.ts.map