Skip to content

Commit b10e481

Browse files
authored
Move FormatDurationOptions under namespace formatDuration (#20)
resolves #19
1 parent 10b2269 commit b10e481

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

format-duration.d.ts

+18-14
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
1-
export interface FormatDurationOptions {
2-
/**
3-
* Adds leading zero to the formatted string.
4-
*/
5-
leading?: boolean
6-
ms?: boolean
1+
declare namespace formatDuration {
2+
interface FormatDurationOptions {
3+
/**
4+
* Adds leading zero to the formatted string.
5+
*/
6+
leading?: boolean
7+
ms?: boolean
8+
}
79
}
810

911
/**
10-
* Convert a number in milliseconds to a standard duration string.
11-
*
12-
* @param {number} ms The number to format.
13-
* @param {object} options - Formatting options
14-
* @returns {string} The formatted duration string.
15-
*/
16-
declare function formatDuration (ms: number, options?: FormatDurationOptions): string
17-
12+
* Convert a number in milliseconds to a standard duration string.
13+
*
14+
* @param {number} ms The number to format.
15+
* @param {object} options - Formatting options
16+
* @returns {string} The formatted duration string.
17+
*/
18+
declare function formatDuration(
19+
ms: number,
20+
options?: formatDuration.FormatDurationOptions
21+
): string
1822
export = formatDuration

0 commit comments

Comments
 (0)