Closed kiki-kanri closed 9 months ago
It is never a good idea to rely on @grammyjs/types
because it might not be in sync with the corresponding type definitions that grammy
uses. This has repeatedly be a problem in the past, and it is why we introduced grammy/types
in the first place.
The grammY runner package (https://github.com/grammyjs/runner) uses /types
without issues, which is why I was surprised that the hydrate plugin caused problems here.
Either way, we just need to fix all of the tedious package.json
configuration so that /types
can be used. #517 seems to be a solution here.
A fix was released in 1.20.2.
It's related to this issue.
I'm not sure if this is the only package that uses the grammy/types export, but for future compatibility, it might be worth referring to the solution I provided in my question, or explicitly restricting other packages from exporting with grammy/types and using @grammyjs/types instead, thanks.