Skip to content

Documentation / @facturometro/validator / Hit

Interface: Hit<N, P> ​

Defined in: packages/validator/src/engine/rule.ts:51

One node a rule's context selected: the node, where it is, and (when it is not the root) the aggregate that contains it.

Example ​

ts
import type { Hit, UncheckedTaxSubtotal } from '@facturometro/validator';

const hit: Hit<UncheckedTaxSubtotal> = {
  node: subtotal,
  parent: taxTotal,
  path: ['taxTotal', 0, 'taxSubtotal', 0],
};

Type Parameters ​

N ​

N = unknown

P ​

P = unknown

Properties ​

node ​

readonly node: N

Defined in: packages/validator/src/engine/rule.ts:53

The selected node.


parent? ​

readonly optional parent?: P

Defined in: packages/validator/src/engine/rule.ts:55

The aggregate the node sits in, when the node is not the document root.


path ​

readonly path: ModelPath

Defined in: packages/validator/src/engine/rule.ts:57

Model path of the node, from the document root.

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