mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-10 09:40:21 +08:00
Update prettyMs to 3.2 (#27721)
Missing option keepDecimalsOnWholeSeconds
This commit is contained in:
4
types/pretty-ms/index.d.ts
vendored
4
types/pretty-ms/index.d.ts
vendored
@@ -1,6 +1,7 @@
|
||||
// Type definitions for pretty-ms 3.0
|
||||
// Type definitions for pretty-ms 3.2
|
||||
// Project: https://github.com/sindresorhus/pretty-ms#readme
|
||||
// Definitions by: BendingBender <https://github.com/BendingBender>
|
||||
// ocboogie <https://github.com/ocboogie>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export = prettyMs;
|
||||
@@ -11,6 +12,7 @@ declare namespace prettyMs {
|
||||
interface PrettyMsOptions {
|
||||
secDecimalDigits?: number;
|
||||
msDecimalDigits?: number;
|
||||
keepDecimalsOnWholeSeconds?: boolean;
|
||||
compact?: boolean;
|
||||
verbose?: boolean;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ let str: string;
|
||||
str = prettyMs(133);
|
||||
str = prettyMs(1337, {compact: true});
|
||||
str = prettyMs(1335669000, {verbose: true});
|
||||
str = prettyMs(1335669000, {keepDecimalsOnWholeSeconds: true});
|
||||
str = prettyMs(1335669000, {secDecimalDigits: 1});
|
||||
str = prettyMs(1335669000, {msDecimalDigits: 2});
|
||||
str = prettyMs(new Date(2014, 0, 1, 10, 40).getTime() - new Date(2014, 0, 1, 10, 5).getTime());
|
||||
|
||||
Reference in New Issue
Block a user