import { ComparisonOperator } from '../types' ; import type { Calculator } from '../types' ; type EqualCalculator < TAmount > = Calculator < TAmount > ; param calculator returns export function equal < TAmount > ( calculator ) { return ( subject , comparator ) => { return calculator . compare ( subject , comparator ) === ComparisonOperator . EQ ; } ; }