mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
types for parse-ms
This commit is contained in:
parent
420f99c1dc
commit
e2c4cb4b3c
12
types/parse-ms/index.d.ts
vendored
Normal file
12
types/parse-ms/index.d.ts
vendored
Normal 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;
|
||||
};
|
||||
3
types/parse-ms/parse-ms-tests.ts
Normal file
3
types/parse-ms/parse-ms-tests.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import parseMs from "parse-ms";
|
||||
|
||||
const { days, hours, milliseconds, minutes, seconds } = parseMs(3000);
|
||||
23
types/parse-ms/tsconfig.json
Normal file
23
types/parse-ms/tsconfig.json
Normal 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"
|
||||
]
|
||||
}
|
||||
1
types/parse-ms/tslint.json
Normal file
1
types/parse-ms/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user