Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -534,3 +534,5 @@ Released with 1.0.0-beta.37 code base.
### Fixed
- Fix jsonrpc payload and response types (#4743) (#4761)
- Allowed more flexibility in typing the overly constrained `provider.disconnect` function (#4833)
- Fix resolve type of getBlock function (#4911)

13 changes: 11 additions & 2 deletions packages/web3-eth/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,15 +218,24 @@ export class Eth {
getBlock(blockHashOrBlockNumber: BlockNumber | string): Promise<BlockTransactionString>;
getBlock(
blockHashOrBlockNumber: BlockNumber | string,
returnTransactionObjects: boolean
returnTransactionObjects: false
): Promise<BlockTransactionString>;
getBlock(
blockHashOrBlockNumber: BlockNumber | string,
returnTransactionObjects: true
): Promise<BlockTransactionObject>;
getBlock(
blockHashOrBlockNumber: BlockNumber | string,
callback?: (error: Error, block: BlockTransactionString) => void
): Promise<BlockTransactionString>;
getBlock(
blockHashOrBlockNumber: BlockNumber | string,
returnTransactionObjects: boolean,
returnTransactionObjects: false,
callback?: (error: Error, block: BlockTransactionString) => void
): Promise<BlockTransactionString>;
getBlock(
blockHashOrBlockNumber: BlockNumber | string,
returnTransactionObjects: true,
callback?: (error: Error, block: BlockTransactionObject) => void
): Promise<BlockTransactionObject>;

Expand Down