From 70813834ba289c631df379b0ddd34eccbe54b0d4 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Fri, 25 Feb 2022 21:54:44 +0100 Subject: [PATCH] fix(getRandomPort): host argument is optional --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 5c58610..5a9b0a9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -59,7 +59,7 @@ export async function getPort (config?: GetPortInput): Promise { return availablePort } -export async function getRandomPort (host: HostAddress) { +export async function getRandomPort (host?: HostAddress) { const port = await checkPort(0, host) if (port === false) { throw new Error('Unable to obtain an available random port number!')