mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-28 12:30:21 +08:00
add definitions and tests for NodeJs package ms v0.7.1
This commit is contained in:
1 parent
b1956785d6
commit
4331a333df
2 files changed
+44
No files matched your search
Vendored
+30
@@ -0,0 +1,30 @@
|
||||
// Type definitions for ms v0.7.1
|
||||
// Project: https://github.com/guille/ms.js
|
||||
// Definitions by: Zhiyuan Wang <https://github.com/danny8002/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare module 'ms' {
|
||||
|
||||
interface IMSOptions {
|
||||
long: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
* Short/Long format for `value`.
|
||||
*
|
||||
* @param {Number} value
|
||||
* @param {{long: boolean}} options
|
||||
* @return {String}
|
||||
*/
|
||||
function ms(value: number, options?: IMSOptions): string;
|
||||
|
||||
/**
|
||||
* Parse the given `value` and return milliseconds.
|
||||
*
|
||||
* @param {String} value
|
||||
* @return {Number}
|
||||
*/
|
||||
function ms(value: string): number;
|
||||
|
||||
export = ms;
|
||||
}
|
||||
Reference in new issue
Block a user