web3.js 是否有 TypeScript 类型定义?
Does web3.js have TypeScript type definition?
是否有任何版本的 Web3 类型?我在 Node.js 中编写后端 API,我更喜欢用 TypeScript 编写。
我问这个是因为我一直在尝试使用 Web3 在 TypeScript 中编写 Express 应用程序并且遇到了这个错误(以及更多错误):
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);
比 1.3.0 更新的最新 web3.js 版本支持 TypeScript。
是否有任何版本的 Web3 类型?我在 Node.js 中编写后端 API,我更喜欢用 TypeScript 编写。
我问这个是因为我一直在尝试使用 Web3 在 TypeScript 中编写 Express 应用程序并且遇到了这个错误(以及更多错误):
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);
比 1.3.0 更新的最新 web3.js 版本支持 TypeScript。