diff --git a/types/microtime/index.d.ts b/types/microtime/index.d.ts new file mode 100644 index 0000000000..72c1d09d63 --- /dev/null +++ b/types/microtime/index.d.ts @@ -0,0 +1,12 @@ +// Type definitions for microtime 2.1 +// Project: https://github.com/wadey/node-microtime +// Definitions by: Kovács Vince +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +export as namespace microtime; + +export function now(): number; + +export function nowDouble(): number; + +export function nowStruct(): number[]; diff --git a/types/microtime/microtime-tests.ts b/types/microtime/microtime-tests.ts new file mode 100644 index 0000000000..81bce7c3a3 --- /dev/null +++ b/types/microtime/microtime-tests.ts @@ -0,0 +1,7 @@ +import * as microtime from "microtime"; + +const nowInteger: number = microtime.now(); + +const nowDouble: number = microtime.nowDouble(); + +const nowStruct: number[] = microtime.nowStruct(); diff --git a/types/microtime/tsconfig.json b/types/microtime/tsconfig.json new file mode 100644 index 0000000000..3bcc951906 --- /dev/null +++ b/types/microtime/tsconfig.json @@ -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" + ] +} diff --git a/types/microtime/tslint.json b/types/microtime/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/microtime/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }