add types of get-port

This commit is contained in:
york yao
2016-08-09 19:33:33 +08:00
parent dd0d729d5d
commit 7aa3ecd72e
2 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
/// <reference path="get-port.d.ts" />
import * as getPort from "get-port";
getPort().then(port => {
console.log(port);
});

9
get-port/get-port.d.ts vendored Normal file
View File

@@ -0,0 +1,9 @@
// Type definitions for ajv
// Project: https://github.com/sindresorhus/get-port
// Definitions by: York Yao <https://github.com/plantain-00/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module "get-port" {
var getPort: () => PromiseLike<number>
export = getPort;
}