Skip to content

Documentation / @facturometro/einvoice / Document

Type Alias: Document ​

Document = CreditNote | Invoice

Defined in: packages/core/src/model/index.ts:36

A validated document of either kind; narrow on kind.

Example ​

ts
import type { Document } from '@facturometro/core';

const lines = (document: Document) =>
  document.kind === 'Invoice' ? document.invoiceLine : document.creditNoteLine;

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