Added missing options.

This commit is contained in:
Ilia Beliaev
2018-12-07 14:52:26 +03:00
parent a5cac1fda5
commit c9b217ba14
2 changed files with 8 additions and 1 deletions
+5 -1
View File
@@ -1,7 +1,8 @@
// Type definitions for pretty-ms 3.2
// Type definitions for pretty-ms 4.0
// Project: https://github.com/sindresorhus/pretty-ms#readme
// Definitions by: BendingBender <https://github.com/BendingBender>
// ocboogie <https://github.com/ocboogie>
// silh <https://github.com/silh>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export = prettyMs;
@@ -14,6 +15,9 @@ declare namespace prettyMs {
msDecimalDigits?: number;
keepDecimalsOnWholeSeconds?: boolean;
compact?: boolean;
unitCount?: number;
verbose?: boolean;
separateMs?: boolean;
formatSubMs?: boolean;
}
}
+3
View File
@@ -7,4 +7,7 @@ str = prettyMs(1335669000, {verbose: true});
str = prettyMs(1335669000, {keepDecimalsOnWholeSeconds: true});
str = prettyMs(1335669000, {secDecimalDigits: 1});
str = prettyMs(1335669000, {msDecimalDigits: 2});
str = prettyMs(1335669000, {unitCount: 2});
str = prettyMs(1335669000, {separateMs: true});
str = prettyMs(1335669000, {formatSubMs: true});
str = prettyMs(new Date(2014, 0, 1, 10, 40).getTime() - new Date(2014, 0, 1, 10, 5).getTime());