---
title: "@quario/csv — API reference"
description: "The CSV render target for quario, covering the csv() factory and the records it resolves."
url: "https://getquario.com/docs/reference/csv"
---

# @quario/csv

The CSV render target. Resolves records as a string.

## `csv()`

```ts title="signature"
function csv(): Target<'csv', Promise<string>>
```

Takes no options, and refuses one rather than discarding it: an options argument
that isn’t nullish throws a `TypeError`. A record is a record, so there’s nothing
here for a host to configure.

This target reads no styles. A declared `format` kind revives nothing and
presents nothing here, so a field keeps the author’s own string. This target
mangles formula-like text on write.

## `capabilities`

```ts title="signature"
const capabilities: {
  readonly target: 'csv'
  readonly declarations: Readonly<Record<string, Fate>>
}

type Fate = 'resolved' | 'approximated' | 'withdrawn' | 'unread'
```

What this target makes of each declaration the [support
matrix](https://getquario.com/docs/reference/support-matrix.md) names, keyed by the schema name an
author writes. Pass it to `plan(schema, functions, { targets })` to check a
document’s `required` marking before you render. It carries no version of its
own. The package that ships it sets the version.

```json
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://getquario.com/"},{"@type":"ListItem","position":2,"name":"Docs","item":"https://getquario.com/docs"},{"@type":"ListItem","position":3,"name":"@quario/csv","item":"https://getquario.com/docs/reference/csv"}]}
```
