From fdece1a8a9ad376dd86a3f98d3ff1abbe96c0909 Mon Sep 17 00:00:00 2001 From: Justin Starry Date: Fri, 28 Feb 2020 19:17:31 +0800 Subject: [PATCH] chore: fix flow --- web3.js/test/__mocks__/rpc-websockets.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/web3.js/test/__mocks__/rpc-websockets.js b/web3.js/test/__mocks__/rpc-websockets.js index 801cffffdb..75a43e4b71 100644 --- a/web3.js/test/__mocks__/rpc-websockets.js +++ b/web3.js/test/__mocks__/rpc-websockets.js @@ -1,6 +1,10 @@ // @flow -import {Client as RpcWebSocketClient} from 'rpc-websockets'; +import { + Client as RpcWebSocketClient, + NodeWebSocketTypeOptions, + IWSClientAdditionalOptions, +} from 'rpc-websockets'; // Define TEST_LIVE in the environment to test against the real full node // identified by `url` instead of using the mock @@ -11,7 +15,10 @@ let mockNotice = true; export class Client { client: RpcWebSocketClient; - constructor(url, options) { + constructor( + url: string, + options: NodeWebSocketTypeOptions & IWSClientAdditionalOptions, + ) { //console.log('MockClient', url, options); if (!mockRpcEnabled) { if (mockNotice) {