Skip to content

Commit

Permalink
fix(getRandomPort): host argument is optional
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Feb 25, 2022
1 parent b144ace commit 7081383
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export async function getPort (config?: GetPortInput): Promise<PortNumber> {
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!')
Expand Down

0 comments on commit 7081383

Please sign in to comment.