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

Figure out how to improve type safety for getBlockProduction API #1280

Closed
mcintyre94 opened this issue Apr 26, 2023 · 1 comment
Closed

Figure out how to improve type safety for getBlockProduction API #1280

mcintyre94 opened this issue Apr 26, 2023 · 1 comment
Labels
enhancement New feature or request stale

Comments

@mcintyre94
Copy link
Contributor

See: #1263 (comment)

Ideally we'd like this to be a type error:

const blockProduction = await rpc.getBlockProduction({identity: 'abc' as Base58EncodedAddress})
blockProduction.value.byIdentity['def' as Base58EncodedAddress]

This typescript playground shows how the types used should be achieving this

But in practice this isn't happening for the web3.js library. I'm guessing this is to do with the proxy indirection, but it needs more investigation.

@mcintyre94 mcintyre94 added the enhancement New feature or request label Apr 26, 2023
@github-actions github-actions bot added the stale label Apr 26, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 3, 2024
Copy link
Contributor

Because there has been no activity on this issue for 7 days since it was closed, it has been automatically locked. Please open a new issue if it requires a follow up.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request stale
Projects
None yet
Development

No branches or pull requests

1 participant