Skip to main content

RuleDiagnosticsResult<F, O, V, C>

RuleDiagnosticsResult<F, O, V, C> = RuleType<F, O, V, C> & { level: number; path: number[]; reasons?: any[]; valid: boolean; }

Defined in: packages/core/src/types/export.ts:493

A RuleType annotated with diagnostics results, as produced by formatQuery for the "diagnostics" format.

The generics mirror those of RuleType.

Type Declaration

level

level: number

The nesting depth of this rule (path.length).

path

path: number[]

The path to this rule within the query tree.

reasons?

optional reasons?: any[]

Reasons why the rule is invalid. Only present when the rule is invalid and specific reasons were provided by the validator.

valid

valid: boolean

Whether the rule passed all validation checks.

Type Parameters

Type ParameterDefault type
F extends stringstring
O extends stringstring
Vany
C extends stringstring

caution

API documentation is generated from the latest commit on the main branch. It may be somewhat inconsistent with official releases of React Query Builder.