Header of the CSV.
Column count strategy that affects field types (default: 'keep')
This type represents a single CSV record as a readonly array. When a header is provided, it creates a named tuple with type-safe indexing. Without a header, it's a variable-length readonly string array.
Type safety with columnCountStrategy:
'keep', 'strict', 'truncate': Fields are typed as string'pad': Fields are typed as string | undefined (missing fields padded with undefined)const header = ["name", "age", "city"] as const;
type Row = CSVArrayRecord<typeof header>;
// readonly [name: string, age: string, city: string]
const row: Row = ["Alice", "30", "NY"];
row[0]; // name: string (type-safe!)
row.length; // 3 (compile-time constant)
const header = ["name", "age", "city"] as const;
type Row = CSVArrayRecord<typeof header, 'pad'>;
// readonly [name: string | undefined, age: string | undefined, city: string | undefined]
const row: Row = ["Alice", "30", undefined]; // Type-safe!
row[2]; // city: string | undefined
CSV record as an array (named tuple format).