Closed paustint closed 2 years ago
The types are overly difficult to construct because of strict typing.
Some possible areas to improve:
Condition
NegationCondition
isNotNegationCondition()
isRegularCondition
ValueCondition | ValueWithDateLiteralCondition | ValueWithDateNLiteralCondition | ValueFunctionCondition
remaining issues TBD
Description
The types are overly difficult to construct because of strict typing.
Some possible areas to improve:
Condition
is hard to work with becauseNegationCondition
isNotNegationCondition()
and maybeisRegularCondition
that would typecast to this:ValueCondition | ValueWithDateLiteralCondition | ValueWithDateNLiteralCondition | ValueFunctionCondition
ValueCondition | ValueWithDateLiteralCondition | ValueWithDateNLiteralCondition | ValueFunctionCondition
as an escape hatch in case a user wants to skip checking and cast.remaining issues TBD