mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-30 18:43:21 +08:00
Merge pull request #16460 from vi-kon/microtime
Type definitions for microtime@2.1
This commit is contained in:
12
types/microtime/index.d.ts
vendored
Normal file
12
types/microtime/index.d.ts
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
// 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
|
||||
|
||||
export as namespace microtime;
|
||||
|
||||
export function now(): number;
|
||||
|
||||
export function nowDouble(): number;
|
||||
|
||||
export function nowStruct(): number[];
|
||||
7
types/microtime/microtime-tests.ts
Normal file
7
types/microtime/microtime-tests.ts
Normal 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();
|
||||
22
types/microtime/tsconfig.json
Normal file
22
types/microtime/tsconfig.json
Normal 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"
|
||||
]
|
||||
}
|
||||
1
types/microtime/tslint.json
Normal file
1
types/microtime/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user