Description
TypeScript Version: nightly (2.0.0-dev.20160903)
The compiler continues on 100% CPU and never end the operation.
this is caused by using very long IF statement like the one exists in Device Detection in the following file URL:
https://github.com/hgoebl/mobile-detect.js/blob/master/mobile-detect.js
you have here a long if, in the "mobileGrade" function, this IF statement stuck the compiler when you take that JS file and use "allowJs" compiler option.
in addition, when it ported that file to TS and kept all content as is, just changed some things, it stuck as well.
after cutting the file in different areas I found it that IF causing hat issue. no matter what IFs parts you cut, it just passes a number if IF parts and stuck.
Code
https://github.com/hgoebl/mobile-detect.js/blob/master/mobile-detect.js
with allowJs compiler.
// A *self-contained* demonstration of the problem follows...
Expected behavior:
finish the compilation with/without errors
Actual behavior:
just stuck on 100% CPU and never ends.