1 | // Type definitions for ms v0.7.1
|
2 | // Project: https://github.com/zeit/ms
|
3 | // Definitions by: Zhiyuan Wang <https://github.com/danny8002>
|
4 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
5 |
|
6 |
|
7 |
|
8 | /**
|
9 | * Short/Long format for `value`.
|
10 | *
|
11 | * @param {Number} value
|
12 | * @param {{long: boolean}} options
|
13 | * @return {String}
|
14 | */
|
15 | declare function ms(value: number, options?: { long: boolean }): string;
|
16 |
|
17 | /**
|
18 | * Parse the given `value` and return milliseconds.
|
19 | *
|
20 | * @param {String} value
|
21 | * @return {Number}
|
22 | */
|
23 | declare function ms(value: string): number;
|
24 |
|
25 | export = ms;
|