Fix ethers-v5 code-generation for no-argument events - #331
Conversation
@typechain/ethers-v5-test | types/Events.d.ts(242,20): error TS2314: Generic type 'TypedEventFilter<EventArgsArray, EventArgsObject>' requires 2 type argument(s).
|
quezak
left a comment
There was a problem hiding this comment.
LGTM, thanks!
Does this fix #321 (comment) ?
|
CC: @zemse |
|
@quezak The code introduced in #321 generates bad code for events that have 0 arguments. I think the comment you pointed to is different, because the The way the “output type” is being generated is by calling My fix is to, for the 0-arg event case, avoid the “hack” and use |
OK, thanks for the explanation -- I wanted to confirm if this solves that linked case too. |
|
You’re welcome @quezak. Thank you. TypeChain is a great tool, and I am happy to contribute this tiny fix. |
|
Thanks @dwardu for the fix! I regret that this error was introduced due to the previous PR and sorry for the inconvenience in your live projects. Since the |
|
Hi @zemse, no problem at all!, and thanks for programming the events support in the first place. |
|
Thanks for the fix. Released as: https://github.com/ethereum-ts/TypeChain/releases/tag/%40typechain/ethers-v5%406.0.1 |
|
That’s great. Thanks 🎉 |
No description provided.