• Returns an available port in the current environment.

    Parameters

    • Optional preferredPort: number

      Number of the preferred port to be used if available.

    • Optional options: GetTCPPortOptions

      Extra configuration for getting TCP ports.

    Returns Promise<number>

    A promise that resolves with an availabe port.