selection.parse
Check that a JSON value is a selector, naming the clause that is wrong.
Usage
Selection.parse(json: unknown, use?: "param" | "query"): Result<GeometrySelector>Parameters
jsonunknownThe candidate selector, e.g. { where: { extremal: "+y" } }.
use"param" | "query"A graph parameter is stricter: no pid (ids are not carried through every operation), and not only around normal. Default
"query".
Returns
Ok with the selector unchanged.
Errors
Example
Selection.parse({ where: { normal: "+w" } }).diagnostics[0].paramPath // → 'where.normal'