A validation rule is a function that receives a validation context and
returns a visitor object. The visitor object has methods for different
AST node kinds that are called during traversal.
The return type is written out rather than inferred: this function is part of
the package's public API, and JSR rejects an inferred return type there
("slow types") because it blocks automatic .d.ts generation for Node.
Create a validation rule that limits query depth.
A validation rule is a function that receives a validation context and returns a visitor object. The visitor object has methods for different AST node kinds that are called during traversal.
The return type is written out rather than inferred: this function is part of the package's public API, and JSR rejects an inferred return type there ("slow types") because it blocks automatic
.d.tsgeneration for Node.