diff --git a/types/parse-ms/index.d.ts b/types/parse-ms/index.d.ts new file mode 100644 index 0000000000..9bf9f23c87 --- /dev/null +++ b/types/parse-ms/index.d.ts @@ -0,0 +1,12 @@ +// Type definitions for parse-ms 1.0 +// Project: https://github.com/sindresorhus/parse-ms#readme +// Definitions by: My Self +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export default function parseMs(ms: number): { + days: number; + hours: number; + minutes: number; + seconds: number; + milliseconds: number; +}; diff --git a/types/parse-ms/parse-ms-tests.ts b/types/parse-ms/parse-ms-tests.ts new file mode 100644 index 0000000000..2b747ad5a8 --- /dev/null +++ b/types/parse-ms/parse-ms-tests.ts @@ -0,0 +1,3 @@ +import parseMs from "parse-ms"; + +const { days, hours, milliseconds, minutes, seconds } = parseMs(3000); diff --git a/types/parse-ms/tsconfig.json b/types/parse-ms/tsconfig.json new file mode 100644 index 0000000000..3fecf7615f --- /dev/null +++ b/types/parse-ms/tsconfig.json @@ -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" + ] +} diff --git a/types/parse-ms/tslint.json b/types/parse-ms/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/parse-ms/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }