File tree 1 file changed +3
-3
lines changed
packages/webdriver/src/node
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import WebSocket from 'ws'
9
9
const log = logger ( 'webdriver' )
10
10
const CONNECTION_TIMEOUT = 10000
11
11
12
- export async function createBidiConnection ( webSocketUrl : string , options ?: unknown ) : Promise < WebSocket | undefined > {
12
+ export async function createBidiConnection ( webSocketUrl : string , options ?: WebSocket . ClientOptions ) : Promise < WebSocket | undefined > {
13
13
const candidateUrls = await listWebsocketCandidateUrls ( webSocketUrl )
14
14
return connectWebsocket ( candidateUrls , options )
15
15
}
@@ -54,11 +54,11 @@ interface ConnectionPromise {
54
54
* @param candidateUrls - list of websocket urls to try
55
55
* @returns true if the connection was successful
56
56
*/
57
- export async function connectWebsocket ( candidateUrls : string [ ] , _ ?: unknown ) : Promise < WebSocket | undefined > {
57
+ export async function connectWebsocket ( candidateUrls : string [ ] , options ?: WebSocket . ClientOptions ) : Promise < WebSocket | undefined > {
58
58
const websockets : WebSocket [ ] = candidateUrls . map ( ( candidateUrl ) => {
59
59
log . debug ( `Attempt to connect to webSocketUrl ${ candidateUrl } ` )
60
60
try {
61
- const ws = new WebSocket ( candidateUrl )
61
+ const ws = new WebSocket ( candidateUrl , options )
62
62
return ws
63
63
} catch {
64
64
return undefined
You can’t perform that action at this time.
0 commit comments