From 008bc5cc7013a08288e7971f8be8edc5c600ce11 Mon Sep 17 00:00:00 2001 From: Gabriel Montes Date: Wed, 25 Sep 2019 20:44:54 -0300 Subject: [PATCH] Fix web3.eth.subscribe callback type (#38383) The callback function of `web3.eth.subscribe` is a `Callback` but the type is not i.e. a `Subscribe`, it is a plain `BlockHeader`. This fix applies to all the subscription types. --- types/web3/eth/index.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/types/web3/eth/index.d.ts b/types/web3/eth/index.d.ts index 62dd1f3df1..0f04d8fe10 100644 --- a/types/web3/eth/index.d.ts +++ b/types/web3/eth/index.d.ts @@ -47,24 +47,24 @@ export default interface Eth { subscribe( type: "logs", options?: Logs, - callback?: Callback> + callback?: Callback ): Promise>; subscribe( type: "syncing", - callback?: Callback> + callback?: Callback ): Promise>; subscribe( type: "newBlockHeaders", - callback?: Callback> + callback?: Callback ): Promise>; subscribe( type: "pendingTransactions", - callback?: Callback> + callback?: Callback ): Promise>; subscribe( type: "pendingTransactions" | "newBlockHeaders" | "syncing" | "logs", options?: Logs, - callback?: Callback> + callback?: Callback ): Promise>; unsubscribe(callBack: Callback): void | boolean;