Type definitions for microtime@2.1

This commit is contained in:
Kovács Vince
2017-05-11 13:22:34 +02:00
parent ac9bfc4eec
commit bb536b6bf2
4 changed files with 44 additions and 0 deletions

14
types/microtime/index.d.ts vendored Normal file
View File

@@ -0,0 +1,14 @@
// Type definitions for microtime 2.1
// Project: https://github.com/wadey/node-microtime
// Definitions by: Kovács Vince <https://github.com/vincekovacs>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace microtime {
function now (): number
function nowDouble (): number
function nowStruct (): number[]
}
export = microtime;

View File

@@ -0,0 +1,7 @@
import * as microtime from "microtime"
const nowInteger: number = microtime.now()
const nowDouble: number = microtime.nowDouble()
const nowStruct: number[] = microtime.nowStruct()

View File

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

View File

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