Skip to main content

GetRuleTypeFromGroupWithFieldAndOperator<RG, F, O>

GetRuleTypeFromGroupWithFieldAndOperator<RG, F, O>: RG extends RuleGroupType<infer RT> | RuleGroupTypeIC<infer RT> ? RT extends RuleType<infer RuleFieldName, infer RuleOperatorName, infer RuleValueName, infer RuleCombinatorName> ? RuleFieldName extends GetOptionIdentifierType<F> ? RuleOperatorName extends GetOptionIdentifierType<O> ? RuleType<RuleFieldName, RuleOperatorName, RuleValueName, RuleCombinatorName> : RuleType<RuleFieldName, GetOptionIdentifierType<O>, RuleValueName, RuleCombinatorName> : RuleOperatorName extends GetOptionIdentifierType<O> ? RuleType<GetOptionIdentifierType<F>, RuleOperatorName, RuleValueName, RuleCombinatorName> : RuleType<GetOptionIdentifierType<F>, GetOptionIdentifierType<O>, RuleValueName, RuleCombinatorName> : never : never

Determines the RuleType of a given RuleGroupType or RuleGroupTypeIC. If the field and operator name types of the rule type extend the identifier types of the provided Field and Operator types, the given rule type is returned as is. Otherwise, the rule type has its field and operator types narrowed to the identifier types of the provided Field and Operator types.

Type Parameters

Type Parameter
RG extends RuleGroupTypeAny
F extends BaseOption
O extends BaseOption

Defined in

packages/react-querybuilder/src/types/ruleGroupsIC.ts:97


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.