/** * Minimal RFC 4180-subset CSV parser. * * Supported: comma delimiter, quoted fields, doubled quotes ("") as escaped * quotes inside quoted fields, commas and newlines inside quoted fields, * CRLF and LF row endings, a leading UTF-8 BOM, and a tolerated trailing * newline. Lines that are completely empty outside quotes are skipped — * skipped lines still advance the physical line count reported in * `rowLines`, so later rows' reported start lines stay correct. * * Deliberately NOT here: header handling, type coercion, and shape * validation. Ragged rows are preserved as-is — validation is the caller's * job (see lossRun.ts). */ export interface CsvParseResult { /** The parsed grid (rows x columns). Ragged rows preserved as-is. */ rows: string[][]; /** * Physical 1-based line number in the input where each row of `rows` * STARTS. Parallel to `rows`. Differs from index+1 whenever blank lines * were skipped or a quoted field contains newlines — callers reporting * row-level problems must use this, not the grid index, or their * diagnostics point at the wrong line of the file. */ rowLines: number[]; /** * Structural problems the parser recovered from. Content is still parsed * leniently — a warning here means the OUTPUT may not mean what the file's * author intended, which the caller must surface rather than swallow: an * unterminated quote consumes the remainder of the input into one field, * and five good rows silently becoming one is how claims vanish. */ warnings: string[]; } /** Parses CSV text into a grid of string fields plus structural warnings. */ export declare function parseCsv(text: string): CsvParseResult; //# sourceMappingURL=csv.d.ts.map