mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
add options for get-port (#19982)
This commit is contained in:
@@ -3,3 +3,7 @@ import * as getPort from "get-port";
|
||||
getPort().then(port => {
|
||||
console.log(port);
|
||||
});
|
||||
|
||||
getPort({ port: 3000 }).then(port => {
|
||||
console.log(port);
|
||||
});
|
||||
|
||||
Vendored
+2
-2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user