chore: fix flow

This commit is contained in:
Justin Starry 2020-02-28 19:17:31 +08:00 committed by Michael Vines
parent 0cdf532419
commit fdece1a8a9
1 changed files with 9 additions and 2 deletions

View File

@ -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) {