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

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

Open
krzysu opened this issue Oct 18, 2024 · 0 comments
Open

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

krzysu opened this issue Oct 18, 2024 · 0 comments

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant