Kaizen
Browse modulesInsightsinsights/sharedFunctions

Function: operatorAllowedForType()

function operatorAllowedForType(operator: 
  | "in"
  | "gt"
  | "lt"
  | "gte"
  | "lte"
  | "eq"
  | "neq"
  | "contains"
  | "between"
  | "isNull"
  | "isNotNull", type: "string" | "number" | "boolean" | "date" | "enum" | "datetime" | "money"): boolean;

Defined in: shared/insights/validate-definition.ts:94

Operator/field-type compatibility matrix — THE matrix: the builder's operator picker derives its offers from this same function (via operatorsForType) instead of mirroring it, so the UI can never offer an operator the validator rejects.

Parameters

ParameterType
operator| "in" | "gt" | "lt" | "gte" | "lte" | "eq" | "neq" | "contains" | "between" | "isNull" | "isNotNull"
type"string" | "number" | "boolean" | "date" | "enum" | "datetime" | "money"

Returns

boolean

On this page