Closed SecondThundeR closed 7 months ago
Which version of TS do you use?
Which version of TS do you use?
5.4.2
Seems like Microsoft messed up with it, because on 5.3.3 it compiles fine
Yes, this is a regression in tsc
. Did you already open an issue?
Not yet, I'll open it unless similar issues have been opened. Then I'm sorry to bother you. Have a nice day!
It also seems to work fine with grammY 1.19.x and below. That means that it is related to having too many update types in grammY, which is a known problem right now. I have already narrowed it down to a minimal reproduction example that I shared among a few interested people in a different chat (https://t.me/fromdeno/31491). It will be very useful if you include the playground link in your issue. That way, people can understand why this bug happens without having to understand all the complex inner workings of grammY first.
One last thing: be sure to mention that people should try the same playground with 5.4.2 and 5.3.3 and compare the reported error. Also, removing two or more properties from the interface Update
fixes the issue. Those two pieces of information are crucial.
Could you leave a link to the opened issue here? :)
Could you leave a link to the opened issue here? :)
Sure
Tried to lookup similar issues, but only https://github.com/microsoft/TypeScript/issues/53234 looked somewhat closer example of what we are facing right now. Here is my issue (hope I made it right): https://github.com/microsoft/TypeScript/issues/57863
Also I removed last .on(...)
example, which is not working on both versions, so devs won't be confused
upd: TypeScript team fixed and closed this issue
Not only they fixed this issue, but it seems they fixed your example at the very end (see https://github.com/microsoft/TypeScript/pull/57871)
Also, now example at the top, compiles at the same time as regular filter (or even faster):
Holy fucking shit, this is big news
@all-contributors add @SecondThundeR for the bug report to Microsoft that uncorked further grammY updates ❤️
@KnorpelSenf
I've put up a pull request to add @SecondThundeR! :tada:
For some reason, tsc taking too long to compile simple example where not full form of filter notation was used, e.g.
.on(":text", ...)
Steps to reproduce:
Insert this snippet to bot.ts
tsc
ortsc --extendedDiagnostics
Expected behavior: TypeScript compiles snippet not longer than regular example or at least not for so long
Actual behavior: TypeScript taking 30-35 seconds to compile simple example with omitted filters/shortcut (was getting the same time with
:contact
at my project)Diagnostics for
.on("message:text", ...)
Diagnostics for
.on(":text", ...)