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!')