From 8704e5327487d02183c7e1837e09c9cc2f0f68a4 Mon Sep 17 00:00:00 2001 From: Iskren Chernev Date: Tue, 10 Oct 2017 12:05:10 +0300 Subject: [PATCH] Add duration clone to TS --- moment.d.ts | 2 ++ typing-tests/moment-tests.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/moment.d.ts b/moment.d.ts index 60d31bf40b..24667a3f5a 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 3b7362364c..af635ca7cf 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();