Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: correct the types of Rpc{Batch}Request to prevent type errors in Connection.ts #26102

Merged
merged 1 commit into from Jun 21, 2022
Merged

chore: correct the types of Rpc{Batch}Request to prevent type errors in Connection.ts #26102

merged 1 commit into from Jun 21, 2022

Conversation

steveluscher
Copy link
Contributor

Problem

The return value of these was incorrect, leading to an any propagating through the code, which led to real breakages in the framework (eg. #26099).

Summary of Changes

When we properly represent this return type as a promise for an array then array methods like map() return correct types.

@steveluscher steveluscher added the javascript Pull requests that update Javascript code label Jun 21, 2022
@codecov
Copy link

codecov bot commented Jun 21, 2022

Codecov Report

Merging #26102 (2ef5933) into master (aea84e6) will not change coverage.
The diff coverage is n/a.

❗ Current head 2ef5933 differs from pull request most recent head 1478e4a. Consider uploading reports for the commit 1478e4a to get more accurate results

@@           Coverage Diff           @@
##           master   #26102   +/-   ##
=======================================
  Coverage    75.7%    75.7%           
=======================================
  Files          40       40           
  Lines        2348     2348           
  Branches      339      339           
=======================================
  Hits         1779     1779           
  Misses        450      450           
  Partials      119      119           

@steveluscher steveluscher merged commit 19eea3a into solana-labs:master Jun 21, 2022
@steveluscher steveluscher deleted the fix-rpc-request-types-web3 branch June 21, 2022 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant