Connection.getBlock return types are missing the blockHeight field #1969
Labels
1.x
Pertains to the v1.x line on the maintenance/v1.x branch
bug
Something isn't working
good first issue
Good for newcomers
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: