import { Duration , DurationInput } from './types' ; import { negate } from './negate' ; import { sum } from './sum' ; example export const subtract = ( duration , ... durationsToSubtract ) : Duration => sum ( duration , ... durationsToSubtract . map ( negate ) ) ;