npm.io
1.3.0 • Published 1 year ago

@types/moment-precise-range-plugin

Licence
MIT
Version
1.3.0
Deps
1
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/moment-precise-range-plugin

Summary

This package contains type definitions for moment-precise-range-plugin (https://github.com/codebox/moment-precise-range).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/moment-precise-range-plugin.

index.d.ts

import moment = require("moment");

export = moment;

declare module "moment" {
    interface PreciseRangeValueObject {
        years: number;
        months: number;
        days: number;
        hours: number;
        minutes: number;
        seconds: number;
        firstDateWasLater: boolean;
    }

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

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

Additional Details

  • Last updated: Mon, 11 Nov 2024 1821 GMT
  • Dependencies: moment

Credits

These definitions were written by Mitchell Grice.