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
Hi!
We use typescript to transpile some es6 modules. I recently found a very annoying piece of code in moment library that just hangs typescript for 40 (!!!!) seconds
I played around with it for a bit, and discovered that removing years <= 1 && ['y'] || ['yy', years]; (the last line) makes it compile pretty much instantly.
It's easy to reproduce: copy the snippet, create a js file (or ts) doesn't matter, and execute it.
Thanks a lot!
The text was updated successfully, but these errors were encountered:
Hi!
We use typescript to transpile some es6 modules. I recently found a very annoying piece of code in
moment
library that just hangs typescript for 40 (!!!!) secondsTypeScript Version:
2.6.0-dev.20170824
Code
I played around with it for a bit, and discovered that removing
years <= 1 && ['y'] || ['yy', years];
(the last line) makes it compile pretty much instantly.It's easy to reproduce: copy the snippet, create a js file (or ts) doesn't matter, and execute it.
Thanks a lot!
The text was updated successfully, but these errors were encountered: