Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

AbstractProvider interface has incorrect signature(s) #5150

@janeklb

Description

@janeklb

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    TypesIncorrect or missing types

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions