import { safeCompare } from '@dinero.js/core' ; import type { CompareParams } from '@dinero.js/core' ; param dineroObject param comparator returns export function compare < TAmount > ( ... [ dineroObject , comparator ] ) { const { calculator } = dineroObject ; const compareFn = safeCompare ( calculator ) ; return compareFn ( dineroObject , comparator ) ; }