Skip to content

DocumentWriter

Defined in: src/core/ir/adapters.ts:62

A synchronous writer for one output format (ir-design §7).

The adapter contracts may change until they stabilize against three or more adapters.

TDoc

readonly consumes: "flow" | "page" | "sheet"

Defined in: src/core/ir/adapters.ts:66

Which tree this writer consumes (‘sheet’ for the native grid writer).


readonly id: string

Defined in: src/core/ir/adapters.ts:64

Output format id: ‘pdf’, ‘svg’, ‘html’, ‘docx’, ‘xlsx’, …


readonly supports: ReadonlySet<string>

Defined in: src/core/ir/adapters.ts:68

Feature vocabulary this writer understands.


write: (doc, opts?) => WriteResult

Defined in: src/core/ir/adapters.ts:70

Encode doc to the output bytes, collecting any losses.

TDoc

WriteOptions

WriteResult