mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 23:37:04 +00:00
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<BlockHeader>`, it is a plain `BlockHeader`. This fix applies to all the subscription types.
This commit is contained in:
committed by
Ben Lichtman
parent
5ae53c2f54
commit
008bc5cc70
Vendored
+5
-5
@@ -47,24 +47,24 @@ export default interface Eth {
|
||||
subscribe(
|
||||
type: "logs",
|
||||
options?: Logs,
|
||||
callback?: Callback<Subscribe<Log>>
|
||||
callback?: Callback<Log>
|
||||
): Promise<Subscribe<Log>>;
|
||||
subscribe(
|
||||
type: "syncing",
|
||||
callback?: Callback<Subscribe<any>>
|
||||
callback?: Callback<any>
|
||||
): Promise<Subscribe<any>>;
|
||||
subscribe(
|
||||
type: "newBlockHeaders",
|
||||
callback?: Callback<Subscribe<BlockHeader>>
|
||||
callback?: Callback<BlockHeader>
|
||||
): Promise<Subscribe<BlockHeader>>;
|
||||
subscribe(
|
||||
type: "pendingTransactions",
|
||||
callback?: Callback<Subscribe<Transaction>>
|
||||
callback?: Callback<Transaction>
|
||||
): Promise<Subscribe<Transaction>>;
|
||||
subscribe(
|
||||
type: "pendingTransactions" | "newBlockHeaders" | "syncing" | "logs",
|
||||
options?: Logs,
|
||||
callback?: Callback<Subscribe<any>>
|
||||
callback?: Callback<any>
|
||||
): Promise<Subscribe<any>>;
|
||||
|
||||
unsubscribe(callBack: Callback<boolean>): void | boolean;
|
||||
|
||||
Reference in New Issue
Block a user