import type { Calculator } from '../types' ; import { equal } from './equal' ; import { lessThan } from './lessThan' ; type LessThanOrEqualCalculator < TAmount > = Calculator < TAmount > ; param calculator returns export function lessThanOrEqual < TAmount > ( calculator ) { return ( subject , comparator ) => { return ( lessThan ( calculator ) ( subject , comparator ) || equal ( calculator ) ( subject , comparator ) ) ; } ; }