web3.js
web3.js copied to clipboard
Export all return types such as `Web3Account` or the signature type
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
}