Skip to content

Commit 68930f7

Browse files
motiz88facebook-github-bot
authored andcommitted
Add rejectUnauthorized option to ws types (facebook#41337)
Summary: Pull Request resolved: facebook#41337 X-link: facebook/metro#1133 Changelog: [Internal] Adds a Flow definition that allows passing the [`rejectUnauthorized`](https://nodejs.org/api/tls.html#tlscreateserveroptions-secureconnectionlistener:~:text=(120%20seconds).-,rejectUnauthorized,-%3Cboolean%3E%20If) option to a WebSocket client. (See [example usage](https://github.com/websockets/ws/blob/a049674d936746c36fe928cc1baaaafd3029a83e/examples/ssl.js#L33) in the `ws` repo.) Reviewed By: robhogan Differential Revision: D51014312 fbshipit-source-id: 25794b1867ca5f15fab1592e8f80cdad8cdf897a
1 parent 1d6b0f1 commit 68930f7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: flow-typed/npm/ws_v7.x.x.js

+1
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ declare type ws$WebSocketOptions = {
125125
createConnection?:
126126
| ((options: net$connectOptions, callback?: () => mixed) => net$Socket)
127127
| ((options: tls$connectOptions, callback?: () => mixed) => tls$TLSSocket),
128+
rejectUnauthorized?: boolean,
128129
};
129130

130131
declare type ws$CloseListener = (code: number, reason: string) => mixed;

0 commit comments

Comments
 (0)