From b1d4152104f1a183e0bd1f20a1517de0dc9e8ca3 Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Fri, 4 Aug 2023 05:45:10 -0700 Subject: [PATCH] Add Flow typedefs for ws, fix usages Summary: Changelog: [Internal] Reviewed By: motiz88 Differential Revision: D48064192 fbshipit-source-id: 0e8d3cbe89ba3f6f46af078c4069fa7a07304ba2 --- .../IntegrationTests/websocket_integration_test_server.js | 2 +- .../rn-tester/js/examples/WebSocket/websocket_test_server.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/rn-tester/IntegrationTests/websocket_integration_test_server.js b/packages/rn-tester/IntegrationTests/websocket_integration_test_server.js index 0f0b597b63a74c..3721840c8c0a32 100755 --- a/packages/rn-tester/IntegrationTests/websocket_integration_test_server.js +++ b/packages/rn-tester/IntegrationTests/websocket_integration_test_server.js @@ -31,7 +31,7 @@ server.on('connection', ws => { console.log('WebSocket integration test server exit'); process.exit(0); } - ws.send(message + '_response'); + ws.send(String(message) + '_response'); }); ws.send('hello'); diff --git a/packages/rn-tester/js/examples/WebSocket/websocket_test_server.js b/packages/rn-tester/js/examples/WebSocket/websocket_test_server.js index 939ba1d42e5eb8..cab8088c377492 100755 --- a/packages/rn-tester/js/examples/WebSocket/websocket_test_server.js +++ b/packages/rn-tester/js/examples/WebSocket/websocket_test_server.js @@ -32,6 +32,7 @@ server.on('connection', ws => { ws.on('message', message => { console.log('Received message:', message); if (respondWithBinary) { + // $FlowFixMe[incompatible-call] message = Buffer.from(message); } if (message === 'getImage') {