You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have two relatively simple grammars. But the problem is that if I generate TypeScript code (as described in the README), the TypeScript compiler takes forever to compile the generated code. Is there a setting or annotation that helps with the compilation times? As it is, it is pretty much unusable for me.
The text was updated successfully, but these errors were encountered:
There was a change somewhere in the middle of TS 2.1 (2.1.3 I believe?) that made a significant behavior change to the way types are parsed. The only way I got decent performance was setting "noImplicitAny": false, in my tsconfig.json. That took the compile times from 4 minutes to a few seconds. I never dug into the specifics of how that improvement worked or how to fix it more correctly, but this at least makes things workable.
Hi @xogeny and @gavbaa !
Sometime ago, I reported a bug: TS/17033 to the TypeScript team.
It looks like the way pegjs generates code makes TS compiler to suffer a little.
In the meantime, yes noImplicitAny is one of the ways to overcome this limitation.
Closing this issue for the moment: as we cannot do nothing at the pluggin level about it, but awaiting for TS compiler to fix, or a big refector in pegjs library itself.
I have two relatively simple grammars. But the problem is that if I generate TypeScript code (as described in the README), the TypeScript compiler takes forever to compile the generated code. Is there a setting or annotation that helps with the compilation times? As it is, it is pretty much unusable for me.
The text was updated successfully, but these errors were encountered: