Skip to content

Documentation / @facturometro/einvoice / SerializeOptions

Interface: SerializeOptions ​

Defined in: packages/serializer/src/serialize.ts:35

How the XML is laid out. Both options only affect whitespace and the prolog; the elements, their order and their content are always the same.

Example ​

ts
serialize(invoice, { declaration: false, indent: false }); // one line, no prolog
serialize(invoice, { indent: '\t' }); // tab-indented

Properties ​

declaration? ​

readonly optional declaration?: boolean

Defined in: packages/serializer/src/serialize.ts:41

Whether to start the output with <?xml version="1.0" encoding="UTF-8"?>.

Default ​

ts
true

indent? ​

readonly optional indent?: string | number | false

Defined in: packages/serializer/src/serialize.ts:48

One level of indentation: a number of spaces, the exact string to use, or false for no line breaks and no indentation at all.

Default ​

ts
2

MIT licensed. Specification artefacts belong to OpenPEPPOL, CEN and OASIS.