Closed KnorpelSenf closed 2 years ago
This might not be possible because TS does not allow to further transform function signatures which have been created by transformative context flavours, i.e. via intersection.
It's technically doable. The recently released parse-mode
is capable of working with hydrate
with the sole exception of replyWithFmt
. On the other hand, if I wanted replyWithFmt
to have some success at the expense of the other functions, I could swap the order of intersection elements in HydrateFlavor
. Further details are at https://github.com/grammyjs/emoji/pull/9#issuecomment-1083364176.
It's.. not a great solution. Perhaps there is a way to modify the function signatures for hydrate
without intersections? I would not imagine that, function overloads of untransformed Context's reply and transformed Context's reply, was what hydrate was exactly going for.
Could you support #9 be on par with parse-mode
?
Feature request
If I adjust the return type of
ctx.reply
using a different plugin, such as the hydrate plugin, I would like the type ofctx.replyWithEmoji
to adjust accordingly. This makes it necessary to use a transformative context flavour, rather than an additive one.