Skip to main content

RuleDiagnosticsResult<F extends string = string, O extends string = string, V = any, C extends string = string>

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

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

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

The generics mirror those of RuleType.

Type Parameters​

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

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.


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.