Class FluentOneConditionBuilder

Supports the fluent syntax on conditions that have a single child condition. It isn't an ideal implementation. It is based on using FluentConditionBuilder, which allows a list of conditions. It simply throws an exception if the user atttempts to add more than one condition.

The reason for this implementation is to avoid having the user to register new fluent condition functions in 3 places: FluentValidatorBuilder, FluentConditionBuilder, and FluentOneConditionBuilder. Additionally, they would have to setup their function to return void instead of a FluentConditionBuilder. That is deemed too much work.

Hierarchy (view full)

Constructors

Accessors

Methods

  • For any implementation of a fluent function that works with FluentConditionBuilder. It takes the parameters passed into that function and assemble the final conditionConfig.

    Parameters

    • conditionType: null | string

      When not null, this will be assigned to conditionConfig for you.

    • conditionConfig: Partial<ConditionConfig>

      If your fluent function supplies stand-alone parameters that belong in conditionConfig, assign them to conditionConfig.

    Returns void

Generated using TypeDoc v0.25.12