Skip to content

Commit

Permalink
Merge pull request #4215 from ichernev:ts-duration-clone
Browse files Browse the repository at this point in the history
[misc] TS: Add duration.clone(), for #4080
  • Loading branch information
ichernev committed Oct 10, 2017
2 parents 6115ae5 + 8704e53 commit 98867b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions moment.d.ts
Expand Up @@ -154,6 +154,8 @@ declare namespace moment {
}

interface Duration {
clone(): Duration;

humanize(withSuffix?: boolean): string;

abs(): Duration;
Expand Down
1 change: 1 addition & 0 deletions typing-tests/moment-tests.ts
Expand Up @@ -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();
Expand Down

0 comments on commit 98867b7

Please sign in to comment.