import moment from 'moment';

declare module 'moment' {
  interface PreciseRangeValueObject extends moment.MomentObjectOutput {
    firstDateWasLater: boolean;
  }

  interface Moment {
      preciseDiff(d2: moment.MomentInput, returnValueObject?: false): string;
      preciseDiff(d2: moment.MomentInput, returnValueObject: true): PreciseRangeValueObject;
  }

  function preciseDiff(d1: moment.MomentInput, d2: moment.MomentInput, returnValueObject?: false): string;
  function preciseDiff(d1: moment.MomentInput, d2: moment.MomentInput, returnValueObject: true): PreciseRangeValueObject;
}