system_assignation/node_modules/parse-ms/index.d.ts

37 lines
596 B
TypeScript
Raw Normal View History

2022-03-24 09:22:39 -04:00
declare namespace parseMilliseconds {
interface Parsed {
days: number;
hours: number;
minutes: number;
seconds: number;
milliseconds: number;
microseconds: number;
nanoseconds: number;
}
}
/**
Parse milliseconds into an object.
@example
```
import parseMilliseconds = require('parse-ms');
parseMilliseconds(1337000001);
// {
// days: 15,
// hours: 11,
// minutes: 23,
// seconds: 20,
// milliseconds: 1,
// microseconds: 0,
// nanoseconds: 0
// }
```
*/
declare function parseMilliseconds(
milliseconds: number
): parseMilliseconds.Parsed;
export = parseMilliseconds;