You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In 1.87.6, the return types of Connection.getBlock such as VersionedBlockResponse and BlockResponse omit the blockHeight field. If Connection.getBlock returns a non-null value, the returned object includes this field.
The types should be updated to include the blockHeight field.
If instead I try to build the following code (note the const blockHeight = block?.blockHeight), TypeScript will complain because the blockHeight field is missing from the VersionedBlockResponse type in @solana/web3.js:
Overview
In 1.87.6, the return types of
Connection.getBlock
such asVersionedBlockResponse
andBlockResponse
omit theblockHeight
field. IfConnection.getBlock
returns a non-null value, the returned object includes this field.The types should be updated to include the
blockHeight
field.Steps to reproduce
Description of bug
The above logs something like the following. Note that the
block
includes theblockHeight
field.If instead I try to build the following code (note the
const blockHeight = block?.blockHeight
), TypeScript will complain because theblockHeight
field is missing from theVersionedBlockResponse
type in @solana/web3.js:The type error is:
The text was updated successfully, but these errors were encountered: