mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
add definitions and tests for NodeJs package ms v0.7.1
This commit is contained in:
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