-
Notifications
You must be signed in to change notification settings - Fork 9
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
@types/web3 is incompatible with web3's built-in types #14
Comments
Hey @krzkaczor My current workaround is to comment out lines 8 and 13 in index.d.ts:
Pls let me know if you need more info. |
You use @alcuadrado @ajsantander Tomorrow I will try to wrap it and release (in the worst case as beta). |
Great, thank you!
Yep |
@alcuadrado can u prepare a reproduction example for me? I can reproduce it. I just migrated dethcrypto/truffle-typechain-example#7 and I didnt encounter ANY issues... |
Btw. i released truffle v5 target as |
@krzkaczor I studied the problem a bit more, while trying to reproduce the issue in a standalone project. I understand it a bit better now. To reproduce, clone and install: https://github.com/ajsantander/typechain-error-sample Typechain generates stuff that extends Truffle.ContractInstance from truffle-typings. If you ever want to use the abstract Truffle types like the Truffle.ContractInstance type in your own code, you have to install truffle-typings. When doing so, 1.0.8 is installed, which produces the following error when attempting to compile typescript:
However, I noticed that Typechain uses version 1.0.4 of truffle-typings, and when pinning to that version, the error is not thrown. As far as I'm concerned, this is a fix for me, but you may want to see a way to avoid this problem for others. There might be breaking changes in truffle-typings that Typechain needs to know about, or something like that. |
Thank you! I will investigate it from now but I think you're right about breaking change somewhere in truffle typings. I will release version I will let you know when it's done. |
* older truffle-typings required, see dethcrypto/truffle-typings#14 (comment)
Hi @krzkaczor |
@forshtat can u prepare some repro for me? Did you tried using |
Hey @krzkaczor
I'm having a compilation problem with this package. Here's tsc output:
I believe the problem is that this package is based in
@types/web3
, and notweb3
's built-int.d.ts
files. These typings are incompatible, and the built-in ones "win" over the other, leading to this error.Do you know how can I fix it? Do you have plans to update this package?
Thanks!
The text was updated successfully, but these errors were encountered: