Merge pull request #27964 from NoxWings/update/get-port

Update get-port to 4.0
This commit is contained in:
Benjamin Lichtman
2018-08-16 20:37:05 -07:00
committed by GitHub
2 changed files with 6 additions and 2 deletions
+4
View File
@@ -7,3 +7,7 @@ getPort().then(port => {
getPort({ port: 3000 }).then(port => {
console.log(port);
});
getPort({ port: [3000, 3001] }).then(port => {
console.log(port);
});
+2 -2
View File
@@ -1,9 +1,9 @@
// Type definitions for get-port 3.2
// Type definitions for get-port 4.0
// 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: (options?: { port?: number, host?: string }) => PromiseLike<number>
var getPort: (options?: { port?: number | ReadonlyArray<number>, host?: string }) => PromiseLike<number>
export = getPort;
}