Closed
Description
TypeScript Version: typescript@3.4.2
, typescript@3.5.0-dev.20190409
Search Terms:
- Heap overflow
Code
type Foo<T> = Extract<{[i in keyof T]: Foo<T[i]>; }[0], 0>;
Expected behavior:
Should print an error for indexing object literal with 0
or using circular references.
Or at least the same behavior as in v3.3.4000
:
Actual behavior:
NodeJS standard heap crash report: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
Playground from typescriptlang.com
produces in-browser heap memory allocation failure:
Playground Link:
Klick me if you are not afraid of crashing your browser's heap
Related Issues:
typesafe-joi
heap overflow JavaScript heap out of memory when compiling typesafe-joi on v3.4.x #30794- extremely slow compilation Extremely slow compilation; resolving generics? #30781
- performance degradation since
typescript@3.4.1
3.4.1 tsc works 20! times slower than 3.3.4 #30663 - weird stack overflow issue Weird stack overflow when compiling 4-line code with function, untyped variable, operator and spread operator within cycle #30804
- stackoverflow question about heap overflow