UNPKG

@o3r/rules-engine

Version:

This module provides a rule engine that can be executed on your Otter application to customize your application (translations, placeholders and configs) based on a json file generated by your CMS.

37 lines 1.54 kB
import { AllConditions, AnyConditions, BinaryOperation, NotCondition, Operand, OperandFact, UnaryOperation } from '../structure'; /** * Determine if the condition is a properties condition * @param condition Condition to analyze */ export declare function isConditionProperties(condition: any): condition is BinaryOperation | UnaryOperation; /** * Determine if the given operand is a Fact operand * @param operand Operand to analyze */ export declare function isOperandFact(operand: any): operand is OperandFact; /** * Determine if the given operand is a Inner Fact operand * @param operand Operand to analyze */ export declare function isOperandRuntimeFact(operand: any): operand is Operand<'RUNTIME_FACT', string>; /** * Determine if the given operand is a Static Value operand * @param operand Operand to analyze */ export declare function isOperandLiteral(operand: any): operand is Operand<'LITERAL'>; /** * Determine if the given condition is All based child conditions * @param condition Condition node */ export declare function isAllConditions(condition: any): condition is AllConditions; /** * Determine if the given condition is Any based child conditions * @param condition Condition node */ export declare function isAnyConditions(condition: any): condition is AnyConditions; /** * Determine if the given condition is Not based child conditions * @param condition Condition node */ export declare function isNotCondition(condition: any): condition is NotCondition; //# sourceMappingURL=rule.helpers.d.ts.map