baml.csv.buffer

An in-memory writer; retrieve the accumulated CSV with `text()`.

Reference version

Signature

function baml.csv.buffer(
options: baml.csv.WriterOptions | null = …

An in-memory writer; retrieve the accumulated CSV with text().

The only writer whose output stays reachable — file-backed writers hand their bytes to baml.fs and keep nothing. Use it to build CSV incrementally when stringify<T> cannot see all the rows at once.

Throws

  • Error { kind: Options } if options is invalid.

Source:<builtin>/baml/ns_csv/csv.bamlbytes 39299–39404