diff --git a/src/v2/rule.ts b/src/v2/rule.ts index ac2fc0326f672314ae03b3e16e01f02709c3707b..fca5b7f10f6d236ddf46dc8d2ff5bcc3b426d9b8 100644 --- a/src/v2/rule.ts +++ b/src/v2/rule.ts @@ -1,7 +1,7 @@ // Types to represents jsonlogic rules https://jsonlogic.com/ export type Operators = "var" | ">" | ">=" | "<" | "<=" | "===" | "!==" | "and" | "or"; -export type Operand = number | string | Rule; -export type Operands = [Operand, Operand?]; +export type Operand = number | string | boolean | Rule; +export type Operands = string | [Operand, Operand, ...Operand[]]; // minimum 2 operands or a value if operator is var export type Rule = { [key in Operators]?: Operands;