types for parse-ms

This commit is contained in:
Unknown 2017-11-29 20:22:10 +00:00
parent 420f99c1dc
commit e2c4cb4b3c
4 changed files with 39 additions and 0 deletions

12
types/parse-ms/index.d.ts vendored Normal file
View File

@ -0,0 +1,12 @@
// Type definitions for parse-ms 1.0
// Project: https://github.com/sindresorhus/parse-ms#readme
// Definitions by: My Self <https://github.com/me>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export default function parseMs(ms: number): {
days: number;
hours: number;
minutes: number;
seconds: number;
milliseconds: number;
};

View File

@ -0,0 +1,3 @@
import parseMs from "parse-ms";
const { days, hours, milliseconds, minutes, seconds } = parseMs(3000);

View File

@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"parse-ms-tests.ts"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }