]> git.ipfire.org Git - thirdparty/moment.git/commitdiff
Add duration clone to TS 4215/head
authorIskren Chernev <iskren.chernev@gmail.com>
Tue, 10 Oct 2017 09:05:10 +0000 (12:05 +0300)
committerIskren Chernev <iskren.chernev@gmail.com>
Tue, 10 Oct 2017 09:05:10 +0000 (12:05 +0300)
moment.d.ts
typing-tests/moment-tests.ts

index 60d31bf40bcf5dfce1951a2007212c949e951d68..24667a3f5a3187a692dc1ee8ffe6eb13ee2f99af 100644 (file)
@@ -154,6 +154,8 @@ declare namespace moment {
   }
 
   interface Duration {
+    clone(): Duration;
+
     humanize(withSuffix?: boolean): string;
 
     abs(): Duration;
index 3b7362364c82d07f09b86cd59bda3c8a5960a685..af635ca7cfd437e3b76ef92cb1f6e78752bd033b 100644 (file)
@@ -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();