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

Export all return types such as Web3Account or the signature type #7341

Closed
krzysu opened this issue Oct 18, 2024 · 0 comments · Fixed by #7374
Closed

Export all return types such as Web3Account or the signature type #7341

krzysu opened this issue Oct 18, 2024 · 0 comments · Fixed by #7374
Assignees
Labels
4.x 4.0 related Investigate P2 Medium severity bugs

Comments

@krzysu
Copy link
Contributor

krzysu commented Oct 18, 2024

Hi, I’ve noticed that some types returned by methods aren’t exported as types, such as Web3Account or Signature (ReturnType<typeof account.sign>). This makes it more difficult to structure larger TypeScript codebases effectively. Please see the example below:

// this is not possible
import { Signature, Web3Account } from "web3"

function processSignature(signature: Signature) {
  // Do something with the signature
}

function prepareAndSignTransaction(account: Web3Account, to: Address) {
  // Prepare the transaction
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4.x 4.0 related Investigate P2 Medium severity bugs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@krzysu @mconnelly8 and others