tronprotocol / tronweb

Javascript API Library for interacting with the TRON Network
MIT License
440 stars 277 forks source link

Tronweb version 5.3.2 doesn't ship with types #548

Open slyofzero opened 2 months ago

slyofzero commented 2 months ago

When doing import TronWeb from "tronweb"; in my TS project, I get the type error saying that

Try `npm i --save-dev @types/tronweb` if it exists or add a new declaration (.d.ts) file containing `declare module 'tronweb';`

@types/tronweb doesn't exist on the npm registry and thus working with this package is not possible in TS.

Satan-web3 commented 2 months ago

Please try out beta version which is refactored by ts. You can install it by following command:

npm install tronweb@beta
tranphuocanh0207 commented 2 months ago

@Satan-web3 beta version can't listen event ?

Satan-web3 commented 2 months ago

@Satan-web3 beta version can't listen event ?

You can now try to listen to it by yourself.

daochild commented 1 month ago

When doing import TronWeb from "tronweb"; in my TS project, I get the type error saying that

Try `npm i --save-dev @types/tronweb` if it exists or add a new declaration (.d.ts) file containing `declare module 'tronweb';`

@types/tronweb doesn't exist on the npm registry and thus working with this package is not possible in TS.

Use this package https://www.npmjs.com/package/@daochild/tronweb-typescript/v/1.2.105