react-querybuilder
Version:
React Query Builder component for constructing queries and filters, with utilities for executing them in various database and evaluation contexts
32 lines (31 loc) • 1.49 kB
TypeScript
import type { ParserCommonOptions } from "../../types/import";
import type { DefaultRuleGroupType, DefaultRuleGroupTypeIC, Except } from "../../types/index.noReact";
/**
* Options object for {@link parseJSONata}.
*
* Note: `listsAsArrays` is ignored by `parseJSONata`; lists are _always_ arrays.
*/
export interface ParseJSONataOptions extends ParserCommonOptions {}
/**
* Converts a JSONata string expression into a query suitable for the
* {@link index!QueryBuilder QueryBuilder} component's `query` or `defaultQuery` props
* ({@link index!DefaultRuleGroupType DefaultRuleGroupType}).
*/
declare function parseJSONata(jsonataInput: string): DefaultRuleGroupType;
/**
* Converts a JSONata string expression into a query suitable for the
* {@link index!QueryBuilder QueryBuilder} component's `query` or `defaultQuery` props
* ({@link index!DefaultRuleGroupType DefaultRuleGroupType}).
*/
declare function parseJSONata(jsonataInput: string, options: Except<ParseJSONataOptions, "independentCombinators"> & {
independentCombinators?: false
}): DefaultRuleGroupType;
/**
* Converts a JSONata string expression into a query suitable for the
* {@link index!QueryBuilder QueryBuilder} component's `query` or `defaultQuery` props
* ({@link index!DefaultRuleGroupTypeIC DefaultRuleGroupTypeIC}).
*/
declare function parseJSONata(jsonataInput: string, options: Except<ParseJSONataOptions, "independentCombinators"> & {
independentCombinators: true
}): DefaultRuleGroupTypeIC;
export { parseJSONata };