Documentation / @facturometro/einvoice / 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 ​
readonlynode:N
Defined in: packages/validator/src/engine/rule.ts:53
The selected node.
parent? ​
readonlyoptionalparent?: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 ​
readonlypath:ModelPath
Defined in: packages/validator/src/engine/rule.ts:57
Model path of the node, from the document root.