Are there types for Web3 in any version? I am coding backend APIs in Node.js and I'd prefer to write in TypeScript.
I am asking this because I have been attempting to write Express apps in TypeScript with Web3 and had this error (and many more):
This expression is not constructable.
Type 'typeof import("c:/Users/Archie/node_modules/web3-eth-contract/types/index")' has no construct signatures.
line: const contract = new Contract(abi.json, address);
The latest web3.js versions newer than 1.3.0 come with TypeScript support.
More information in web3.js release notes
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With