Skip to content

Compiler hang on this complicated example #24016

Closed
@zen0wu

Description

@zen0wu

TypeScript Version: 2.9.0-dev.20180510
NodeJS Version: 9.11.1
OS Version: Mac OS X 10.13.4

Search Terms: hangs

Code
It's a pretty involved and complicated code. Put it up as a gist for better readability.

https://gist.github.com/shivawu/22053a9292ac694bfc87c97ef3c652bf

Note the last line, if it's commented it out, it compiles just fine. That particular line hangs the compiler.

Expected behavior:
It should type check just fine.

Actual behavior:
The compiler hangs. Taking 100% CPU, memory keeps increasing non-stop.

Playground Link: I would skip that since the code would hang the browser tab :)

Related Issues: #7344, #23458 looks similar as well

Metadata

Metadata

Assignees

Labels

Design LimitationConstraints of the existing architecture prevent this from being fixed

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions