From: Iskren Chernev Date: Tue, 10 Oct 2017 09:05:10 +0000 (+0300) Subject: Add duration clone to TS X-Git-Tag: 2.19.0~3^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8704e5327487d02183c7e1837e09c9cc2f0f68a4;p=thirdparty%2Fmoment.git Add duration clone to TS --- diff --git a/moment.d.ts b/moment.d.ts index 60d31bf40..24667a3f5 100644 --- a/moment.d.ts +++ b/moment.d.ts @@ -154,6 +154,8 @@ declare namespace moment { } interface Duration { + clone(): Duration; + humanize(withSuffix?: boolean): string; abs(): Duration; diff --git a/typing-tests/moment-tests.ts b/typing-tests/moment-tests.ts index 3b7362364..af635ca7c 100644 --- a/typing-tests/moment-tests.ts +++ b/typing-tests/moment-tests.ts @@ -256,6 +256,7 @@ moment.duration({ M: 2, y: 2, }); +moment.duration(1, "minute").clone(); moment.duration(1, "minutes").humanize(); moment.duration(500).milliseconds(); moment.duration(500).asMilliseconds();