add options for get-port (#19982)

This commit is contained in:
York Yao
2017-09-25 17:13:47 -07:00
committed by Mohamed Hegazy
parent 7918307c73
commit 63e44abfcb
2 changed files with 6 additions and 2 deletions
+4
View File
@@ -3,3 +3,7 @@ import * as getPort from "get-port";
getPort().then(port => {
console.log(port);
});
getPort({ port: 3000 }).then(port => {
console.log(port);
});
+2 -2
View File
@@ -1,9 +1,9 @@
// Type definitions for ajv
// Type definitions for get-port 3.2
// 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>
var getPort: (options?: { port?: number, host?: string }) => PromiseLike<number>
export = getPort;
}