import { safeSubtract } from '@dinero.js/core' ; import type { SubtractParams } from '@dinero.js/core' ; param minuend param subtrahend returns export function subtract < TAmount > ( ... [ minuend , subtrahend ] ) { const { calculator } = minuend ; const subtractFn = safeSubtract ( calculator ) ; return subtractFn ( minuend , subtrahend ) ; }