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

AbstractProvider interface has incorrect signature(s) #5150

Closed
1 task done
janeklb opened this issue Jun 21, 2022 · 0 comments · Fixed by #5158
Closed
1 task done

AbstractProvider interface has incorrect signature(s) #5150

janeklb opened this issue Jun 21, 2022 · 0 comments · Fixed by #5158
Labels
Types Incorrect or missing types

Comments

@janeklb
Copy link

janeklb commented Jun 21, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

The callback parameter of the sendAsync method (and maybe the send method too) returns a promise (not sure if this is always the case.. but it returns a promise sometimes). The implementation does not have a void signature.

https://github.com/ChainSafe/web3.js/blob/0b890b70b977451836dc693614960256bcbcb6d8/packages/web3-core/types/index.d.ts#L444-L449

Expected Behavior

The AbstractProvider interface should be updated so that the callback parameter of sendAsync and send is correct.

callback's return type should either be unknown or Promise<unknown> depending on whether promises are always returned.

Steps to Reproduce

N/A

Web3.js Version

1.7.3

Environment

No response

Anything Else?

No response

@janeklb janeklb added the Bug Addressing a bug label Jun 21, 2022
@nazarhussain nazarhussain added Types Incorrect or missing types and removed Bug Addressing a bug labels Jun 22, 2022
@jdevcs jdevcs closed this as completed Jul 5, 2022
@jdevcs jdevcs mentioned this issue Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Types Incorrect or missing types
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants