baml.csv.decode
Eager typed parse of in-memory input.
Reference version
Signature
function baml.csv.decode<T>(
source: string | uint8array,
options: baml.csv.ReaderOptions | null = …
) -> T[] throws baml.csv.Error
Eager typed parse of in-memory input.
The in-memory counterpart of read<T>, with Record.decode<T>'s rules.
The same one-shot caveat as parse applies: the reader is not returned, so
skipped() is unreachable and on_skip is the only way to observe skipped
rows.
Throws
Errorfor anythingreaderandReader.rows<T>throw, and for anyDecodefailure not suppressed byon_error = "skip".
Source:<builtin>/baml/ns_csv/csv.bamlbytes 35389–35732