diff --git a/types/index.d.ts b/types/index.d.ts index aaa22f8..c1a54f5 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -72,6 +72,7 @@ export class Operator { evaluator: OperatorEvaluator, validator?: (factValue: A) => boolean ); + evaluate(factValue: A, compareToValue: B): boolean; } export interface OperatorDecoratorEvaluator { diff --git a/types/index.test-d.ts b/types/index.test-d.ts index a7e1120..2cb5d5e 100644 --- a/types/index.test-d.ts +++ b/types/index.test-d.ts @@ -90,6 +90,7 @@ const operator: Operator = new Operator( ); expectType(engine.addOperator(operator)); expectType(engine.removeOperator(operator)); +expectType(operator.evaluate(1, 1)); // Operator Decorator tests const operatorDecoratorEvaluator: OperatorDecoratorEvaluator = (