solana-labs / solana-web3.js

Solana JavaScript SDK
https://solana-labs.github.io/solana-web3.js
MIT License
1.97k stars 791 forks source link

refactor(experimental): type reconciliation: `GetAccountInfoApi` #2875

Closed buffalojoec closed 2 days ago

buffalojoec commented 6 days ago

I have no idea if this stack is actually going to do us any material good, but here goes...

In many API definitions across @solana/rpc-api, we waffle between using the SolanaRpcResponse wrapper in the "base types" and in the method signatures.

This can make things extremely difficult to follow when updating types. It's also tricky to spot if we're accurately returning an RPC Response object on the methods that should be.

This stack updates every delinquent method to use the same pattern:

The entire stack is the same, for each method in the title, so I'm not going to update each PR's description.

👉 There is one method whose types were incorrect. It's this one: https://github.com/solana-labs/solana-web3.js/pull/2892

changeset-bot[bot] commented 6 days ago

⚠️ No Changeset found

Latest commit: b8b3203c188272e84e6e64daa93fc7279a606fed

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

buffalojoec commented 6 days ago

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @buffalojoec and the rest of your teammates on Graphite Graphite

steveluscher commented 2 days ago

Merge activity