Skip to content

Documentation / @facturometro/einvoice / pathToString

Function: pathToString() ​

pathToString(path): string

Defined in: packages/core/src/issue.ts:182

Renders a model path the way it would be written in TypeScript.

Parameters ​

path ​

ModelPath

Property names and array indexes, outermost first.

Returns ​

string

The rendered path; the empty string for the document root.

Example ​

ts
import { pathToString } from '@facturometro/core';

pathToString(['invoiceLine', 2, 'price', 'priceAmount']); // 'invoiceLine[2].price.priceAmount'

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